We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Refreshing Problem

Hai, I have a GDBG and and a DataTable is set as the dataSource for that grid . The dataTable is loaded with data and I want to make the values of all the cells to blank, So I have written this.grid.BeginUpdate(); foreach(DataRow row in dataTable.Rows) { row["ColumnName"] = DbNull.Value; . . . } this.grid.EndUpdate(); After there is a refreshing problem happening.

3 Replies

AD Administrator Syncfusion Team September 17, 2004 11:58 AM UTC

You should check if there are any exceptions being thrown from this code (as might be the case if this column in your DataTable does not allow nulls). If there are no exceptions being thrown, then after this.grid.EndUpdate, you would have to call this.grid.Refresh (or RefreshRange) to tell the grid to repaint itself to show the changes you have made.


AR arvind September 17, 2004 12:17 PM UTC

Hai , I don''t have any exception in any of the columns,One column''c Cell type is DateTime. If I take out the BeginUpdate() and EndUpdate() ,then I can see the rows becoming empty. >You should check if there are any exceptions being thrown from this code (as might be the case if this column in your DataTable does not allow nulls). > >If there are no exceptions being thrown, then after this.grid.EndUpdate, you would have to call this.grid.Refresh (or RefreshRange) to tell the grid to repaint itself to show the changes you have made. > >


AD Administrator Syncfusion Team September 17, 2004 01:01 PM UTC

Leave your code the way you have it, but after grid.EndUpdate(), add grid.Refresh();

Loader.
Live Chat Icon For mobile
Up arrow icon