Hi All,
I am having trouble clearing selected rows.
Please note, on some computers it works fine, on others is does not work at all.
Please note the code below. Selected rows just will not clear.
I appreciate any advice, as this does not make much sense to me...
Jeff
Dim ug As UltraGrid, r As UltraGridRow
If TypeOf c Is UltraGrid Then
ug = c
ug.Selected.Rows.Clear()
r.Selected = False
Next
End If
ugBusiness_Unit.Selected.Rows.Clear()
ugProduct.Selected.Rows.Clear()
ugMfg_Line.Selected.Rows.Clear()
End Sub
Hi Jeff,
grid.Selected.Rows.Clear should be more than sufficient to clear the selected rows in a grid, You should not need to do any of that other stuff. What exactly is not working? How many rows are selected before you clear and how many remain selected after? Are you sure any rows are still selected? Perhaps there is simply an ActiveRow? Did you check grid.Selected.Rows.Count after you cleared the selected rows?
Hey Mike,
You were right.
The user was not using the row selector; he was setting the Active row.
Your suggestion to check the Selected.Row.Count, before and after the Clear method, told the tale.
Because these grids are single column, the Active row appeared to be selected.
Thank you, thank you, (this was killing me).