Wrox Programmer Forums
|
BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1
This is the forum to discuss the Wrox book Professional Visual Basic 2008 by Bill Evjen, Billy Hollis, Bill Sheldon, Kent Sharkey; ISBN: 9780470191361
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 3rd, 2010, 02:05 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default listview update

i have a form in my application that calculates the invoice of all the charges of a patients. there is a form that calculates the room charges of the patient but it will no update the previous record.
what i want is the room charges form to calculate and add the room charges of the patient then display the result in listview. if i add a new room charge i want the form to update the total charge in the listview.

thanks
 
Old February 5th, 2011, 08:39 AM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First off why a listview? Why not a label or a textbox?

How many items are in the listview? The items are in a base 0 array so if it's just one item it's index will be 0.

Here is a simple example. (In this sample i use the Button1.Click event. you would obviously use an event that trigers when the calculations are made.)

Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListView1.Items.Add("hello")
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ListView1.Items.Item(0).Text = "good bye"
    End Sub
Finally what does this have to do with Visual Basic .NET list view is a COM control.
__________________
Need free one on one help getting started with Visual Basic? Contact me via http://patrickcambria.com its free.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh Listview after Database Update neo_jakey Pro VB 6 8 March 14th, 2011 04:33 AM
Update Listview after Thread guruk BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 March 16th, 2009 05:06 PM
how to update table with listview items Singh591 Pro VB.NET 2002/2003 0 December 30th, 2006 11:13 PM
listView AristotleYu ASP.NET 2.0 Basics 0 May 11th, 2006 04:54 AM
Binding a comboBox to update a listView Amethyst1984 VB How-To 2 February 28th, 2006 03:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.