listView questions

Gamezhoek

Member
Joined
Jan 13, 2006
Messages
9
Programming Experience
1-3
1) I made a kind of Excel with a listView. The gridline's are on true, and it's detailed. So you have cell's. But how can I make it possible you can type in different cell's? There are 27 columns and 300 items.

2) How can I make you delete an item of the listview? All the item's are in the column 'columnHeader1'.
I tried this code:
VB.NET:
If columnHeader1.ListView.SelectedItems.Count>0 Then
              columnHeader1.ListView.SelectedItems.Clear()    
          End If
But it won't work.
I hope I can find help here.
 
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] lvitem [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] ListViewItem
[/SIZE][SIZE=2][COLOR=#0000ff]For [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][SIZE=2] lvitem [/SIZE][SIZE=2][COLOR=#0000ff]In [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ListView1.SelectedItems
   lvitem.Remove()
[/SIZE][SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE]

HTH
Regards ;)
 
Oh, but question 1 is still unsolved. :)
The question is:
I made a kind of Excel with a listView. The gridline's are on true, and it's detailed. So you have cell's. But how can I make it possible you can type in different cell's? There are 27 columns and 300 items.
 
You can only edit the first column of a ListView by setting LabelEdit to True. If you want to edit all columns then you'd need a DataGrid or a proper spreadsheet component. These are available but you'd almost certainly have to pay.
 
I don't understand anything of it. I tried it, but it gives only errors. Maybe you, or someone else, can explain it a little bit more.:)
 
Back
Top