How should I delete all rows from the grid?
Private Sub ClearFilterGrid() grdFilter.Selected.Rows.AddRange(CType(grdFilter.Rows.All, UltraGridRow())) ' Can't select more than 1 row when SelectType is Single or SingleAutoDrag grdFilter.DeleteSelectedRows() End Sub
Now, is there an other method but selecting the rows?Say, if I have a special behavior when a row is selected, I don't want to raise some unuseful events, I just want to delete rows in the grid, it-s all.
Alternatively, if you are using a proper collection as your data source, is to clear that collection.
Example:Dim objectCollection as List(of MyObject)UltraGrid1.DataSource = objectCollection
...
objectCollection.Clear()
I am afraid I have no DataSource on the grid, because I fill-in manually.