How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.
Printable View
How can I add a new item to a particular column in report view? For example I have a columns named First and Second, I want to add an item to the Second column and not in First. Please tell me how. Please. Please. Please.
Dim clmX As ColumnHeader
Dim itmX As ListItem
' Will set up 4 columns
Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
Set clmX = ListView1.ColumnHeaders.Add(Index, Key, header, Width)
' Add first row, first column
Set itmX = ListView1.ListItems.Add(Index, Key, "1st column value")
' Subitems are the rest of the columns for the first row
itmX.SubItems(1) = "" ' No 2nd column value
itmX.SubItems(2) = "3rd column value"
itmX.SubItems(3) = "4th column value"