All-
I have a screen where I have a Listview control with multiple subitems (columns from a query). The order of the ListItems is significant. I want to give the user an option of reordering the ListItems by selecting one and using an up or down command button. I can't seem to make this work. My code is below... Thanks in advance...
Dim itmX As ListItem
Dim itmY As ListItem
Dim SelIndex As Integer
SelIndex = lstDiscTree.SelectedItem.Index
'Back up SELECTED item
Set itmX = lstDiscTree.ListItems.Item(SelIndex)
'Remove the SELECTED ITEM
lstDiscTree.ListItems.Remove (SelIndex)
Set itmY = lstDiscTree.ListItems.Add((SelIndex - 1))
Set itmY = itmX
I have a screen where I have a Listview control with multiple subitems (columns from a query). The order of the ListItems is significant. I want to give the user an option of reordering the ListItems by selecting one and using an up or down command button. I can't seem to make this work. My code is below... Thanks in advance...
Dim itmX As ListItem
Dim itmY As ListItem
Dim SelIndex As Integer
SelIndex = lstDiscTree.SelectedItem.Index
'Back up SELECTED item
Set itmX = lstDiscTree.ListItems.Item(SelIndex)
'Remove the SELECTED ITEM
lstDiscTree.ListItems.Remove (SelIndex)
Set itmY = lstDiscTree.ListItems.Add((SelIndex - 1))
Set itmY = itmX