How to Update Item in ListView in Vb 6.0
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to Update Item in ListView in Vb 6.0

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    34

    How to Update Item in ListView in Vb 6.0

    Hello Guys,, I need Your help..
    I Have A Code to Adding Item in Listview but I dont know how to update the Date.. Heres My Code
    Code:
    ListView1.ListItems.Add , , lblrp.Caption
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , txtCode.Text
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , txtproductname.Text
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , txtqty.Text
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , txtprice.Text
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , lbltotal.Text
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , MDIForm1.lbldate.Caption
    Guys, Give some Advice How to Do that.. Thanks in Advance..

    My Problem is How to Update the Item in Listview ...

  2. #2
    Join Date
    Jul 2005
    Posts
    1,075

    Re: How to Update Item in ListView in Vb 6.0

    Try next way
    Code:
      Dim LI              As MSComctlLib.ListItem
      
      Set LI = ListView1.ListItems.Add(, , lblrp.Caption)
          LI.SubItems(1) = txtCode.Text
          LI.SubItems(2) = Trim(TBolseU!Calibre)
          LI.SubItems(3) = txtproductname.Text
          LI.SubItems(4) = txtqty.Text
          LI.SubItems(5) = lbltotal.Text
          LI.SubItems(6) = MDIForm1.lbldate.Caption
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center