Click to See Complete Forum and Search --> : listview control que


tolisss
March 23rd, 2001, 09:39 PM
i use a listview control in report view that has 3 columns i set its labelwrap property to automatic so i can edit it at runtime by click. but now i can edit only the 1st column how can i edit the other 2?

coolbiz
March 24th, 2001, 09:50 PM
The same problem I had when I first used ListView control. My workaround is to do manual editing.

My ListView has 2 columns (ID and Description) and populated from a text file. I trapped the DOUBLE-CLICK event and request user to enter a new text via InputBox() function for the Description data (since they cannot change the ID).


private sub ListView1_DblClick()
if (ListView1.ListItems.Count = 0) then exit sub

' get the selected row
dim oItem as ListItem
set oItem = ListView1.SelectedItem

oItem.SubItem(1) = InputBox("Description:", "Modify Descrption", oItem.SubItem(1))
set oItem = nothing
end sub




Hope this helps,
-Cool Bizs