View = lvwList), no property indicates which column the user clicked on within the selected row. The ListView's HitTest method returns only a reference to the Listltem the user clicked on, not the specific subitem.
hi all, here my problem is i'm preety new to '>vb.net programming. but have a little knowledge in vb6 programming. Say, when i press the 'edit' button a listview is shown, filled with records('empcode' field from empdetail) from a access table, say 'empdetail'. now if i doubleclick on a particuler record in the listview, then the listview will disappear and the records will be displayed in the textboxes. exactly what we do in vb6, the coding follows,cn is the connection to the db.
now i want to do exactly the same thing with '>vb.net, please give me the sample coding, because i know the logic but not familier with '>vb.net syntax.now if i click on the listview, it's being hung. any help is appricieted, thank u again
Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
Jumba, I have asked to move the post to .Net, I am sure the experts on .net will be able to help you out.
Good luck.
Look in the MSDN LIbrary
the answer is in the library at
Displaying Subitems in Columns with the Windows Forms ListView Control you can look online if you don't have your own copy.
Share Flag
One way
There are a number of different ways, but one easy way is below.
While objread.Read Dim LVI as ListViewItem = lsvCustomers.Items.Add('.') LVI.Text = objread('Customer_AccNumber') LVI.SubItems.Add(objread('Customer_Name') .. End While Note I take advantage of the fact the Add method to the ListViewItemCollection returns a ListViewItem which we can then use to set its properties (Text and SubItems). Vb6 Listview Add Items
Share Flag
![]() Edit Listview Subitem In Vb6 InstructionAdding items to subitemsEdit Listview Subitem In Vb6 Instruments
Steam failed to initialize please exit and try again. While objread.Read
dim lvItem as New ListViewItem lsvCustomers.Items.Add(lvItem) lvItem.Text = objread('Customer_AccNumber') lvItem.SubItems.Add(objread('Customer_Name')) lvItem.SubItems.Add(objread('Customer_SurName')) . . . End While Edit Listview Subitem In Vb6 Instructions
Share Flag
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |