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

Does virtual grid cell save have to refresh page?

I''m seeing behavior in the virtual grid in which when I update a cell on the page (cell save event), the entire page appears to refresh. I get query events on every cell on the page. This is pretty expensive when the cell data access is somewhat complex. Is there any way to avoid a re-query on every cell when the save event is handled? BTW: I tried this on Syncfusion''s hierarchical tree virtual grid sample and saw the same behavior. Thanks, John

3 Replies

AD Administrator Syncfusion Team July 7, 2004 05:43 AM UTC

In the VirtTreeGrid sample, the reason the whole grid is being redrawn when you change a single cell is the this.gridControl1.Refresh(); call at the bottom of GridSaveCellInfo. In this sample, this call is not necessary if you are changing the data from within the grid using the keyboard. If you add a button handler, and change the external data without going through the grid, then you do have to get this cell to redraw itself somehow to reflect the change. But you do not have to blindly call grid.Refresh. Instead, you can call grid.RefreshRange to only refresh the cell (or cells) that you have modified from outside the grid. So, in your code, are you calling grid.Refresh? If so, you may want to consider whether it is really needed or not. If it is needed, you could then try using grid.RefreshRange if possible to speed things up.


JH John Huschka July 7, 2004 12:15 PM UTC

Clay: Thanks so much for your help. You have appeared to confirm that there is no built in, implicit refresh. (And I removed the refresh from the sample, and there was no such refresh). Therefore, I guess I need to dig further into my code and figure out why this is happening. To my knowledge, I have no "refresh". Thanks for your help, John >In the VirtTreeGrid sample, the reason the whole grid is being redrawn when you change a single cell is the this.gridControl1.Refresh(); call at the bottom of GridSaveCellInfo. In this sample, this call is not necessary if you are changing the data from within the grid using the keyboard. > >If you add a button handler, and change the external data without going through the grid, then you do have to get this cell to redraw itself somehow to reflect the change. But you do not have to blindly call grid.Refresh. Instead, you can call grid.RefreshRange to only refresh the cell (or cells) that you have modified from outside the grid. > >So, in your code, are you calling grid.Refresh? If so, you may want to consider whether it is really needed or not. If it is needed, you could then try using grid.RefreshRange if possible to speed things up.


AD Administrator Syncfusion Team July 7, 2004 12:49 PM UTC

One other comment. Make sure you are using at least 1.6.1.8 (2.0.x would be better). In earlier versions, in some cases there were unnecessary calls to QueryCellInfo.

Loader.
Live Chat Icon For mobile
Up arrow icon