Hi all,
actually i don't want use the grid1.datasource = nothing.
is that have any others way to clear all rows?
the purpose i want clear all the rows because I don't want keep the unuse data, I want get the latest data.
Do this.
foreach (Infragistics.Win.UltraWinGrid.UltraGridRow dr in myUltraGrid.Rows.All) { dr.Delete(false); }
Obviously myUltraGrid is something else in your case. false suppresses the prompt for each row deletion.
Hi,
I'm not really sure what you are looking to do here, but the grid doesn't have any way to clear all the rows at once. The grid displays whatever rows the DataSource gives it. So if you want to remove all the rows in the grid, you would have to remove the rows from the data source. How you do that depends on your data source and has nothing to do with the grid.
I suppose you could loop through the rows in the grid and Delete each one individually, but this would not be very efficient.