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

how to refresh a cell in virtual grid when the data in externdal data source changes

I am using a virtual grid with a external data source. right now, the data of a celll in the external data source changes, how do i notify the grid to redraw the cell to show the change?

3 Replies

AD Administrator Syncfusion Team November 20, 2002 02:14 AM

Try calling RefreshRange passing it a range object that holds the cell (or row or column or whatever) that you want redrawn. this.gridControl1.RefreshRange(GridRangeInfor.Cell(updateRow, updateCol));


MA mark November 20, 2002 08:39 PM

hi, Clay, thank you for the quick reply. i tried to use the RefreshRange, it did not seem to work. the source code is in the attachment. Can you take a look and tell me what i have done wrong? another issue is when i run this program, my cpu fluctuated from 3% - 60%. i think that is too much. My machine is pentium 4 1.8G, 752 meg ram, win 2000 pro. any idea why it takes so much cpu? thank you for your help mark > Try calling RefreshRange passing it a range object that holds the cell (or row or column or whatever) that you want redrawn. > > this.gridControl1.RefreshRange(GridRangeInfor.Cell(updateRow, updateCol)); >


AD Administrator Syncfusion Team November 21, 2002 01:38 AM

Mark, You are trying to update the top left cell, cell 1,1. This cell has indices 1,1 since the default grid uses the row 0 for column headers and column 0 for row headers. But the external datasource does not have any row header or column header information, so the it uses a zero-based indexer, making _data[0,0] map to cell 1,1. In your code, you were changing _data[1,1] (instead of _data[0,0]), but redrawing cell 1,1. Anyway changing _data[1,1] to _data[0,0] made you code work though since you are firing every 10 milliseconds, the cell is more or less a blur of numbers.

Loader.
Live Chat Icon For mobile
Up arrow icon