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
close icon

GDBG: Refresh data

I have a data bound grid where I initalize the row and column settings in the code then I attach it to a data source that is loaded from a SQL Query.

I occasionally refresh the data table with new data from SQL. How can I refresh the grid without having to reset all of my column and row settings?

3 Replies

AP Amy Patterson December 4, 2006 10:04 PM UTC

The data is stored in a dataset and is refilled from SQL at run time.



AD Administrator Syncfusion Team December 5, 2006 04:35 AM UTC

Hi Amy,

Use the Grid.Refresh or Grid.Invalidate method to redraw the whole grid. If you want to repaint the particular cell/region, you can call Grid.Model.RefreshRange passing in a range of cells to limit the painting to something other than the whole grid.

Best Regards,
Haneef


AD Administrator Syncfusion Team December 5, 2006 09:27 PM UTC

When I use any of these it gets rid of my column formatting. I am hiding some columns and setting the formatting of others. Doing a refresh updates the data but deletes the column formatting. I am trying to avoid having to set the formatting every time that I do a refresh of the data.

The reason for this is that I have a column of buttons and every time I reformat the column, after a button was pressed, it does not seem to clear out the event stuff properly and it is calling the button event three times for every row in the table.

Loader.
Live Chat Icon For mobile
Up arrow icon