Listview in VB.Net
-
Hi All, I have a issue in pre-selecting the first item of the listview control before displaying the form. I have 2 forms. Form1 has a modify button and Form2 has a Listview control. When the modify button in Form1 is clicked, it should populate the Listview items for the control in form2 and before displaying the form2 the default selected item of the listview is set to item(0)(i.e the First item). I am able to populate the items and the problem occurs when i set the property the below said property. MaterialListView.Items(0).Selected = True it throws the below said error. An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle. Can someone help ? Thanks
-
Hi All, I have a issue in pre-selecting the first item of the listview control before displaying the form. I have 2 forms. Form1 has a modify button and Form2 has a Listview control. When the modify button in Form1 is clicked, it should populate the Listview items for the control in form2 and before displaying the form2 the default selected item of the listview is set to item(0)(i.e the First item). I am able to populate the items and the problem occurs when i set the property the below said property. MaterialListView.Items(0).Selected = True it throws the below said error. An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle. Can someone help ? Thanks
I have done somthing similar, here is the code i used to select an item:
lstTracks.SetSelected(iSelected, True)
iSelected is just an integer Hope that helps - Andy http://www.guardian.co.nr -
I have done somthing similar, here is the code i used to select an item:
lstTracks.SetSelected(iSelected, True)
iSelected is just an integer Hope that helps - Andy http://www.guardian.co.nrHi Andy, Thanks for your reply. Actually i am using ListView so i don't see any property called Setselected. I think this property is for List box. Let me know if i have misunderstood anything. cheers