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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

1707 Nov 20,2002 03:29 AM UTC Nov 21,2002 06:38 AM UTC Windows Forms 3
loading
Tags: GridControl
mark
Asked On November 20, 2002 03:29 AM UTC

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?

Administrator [Syncfusion]
Replied On November 20, 2002 07:14 AM UTC

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));

mark
Replied On November 21, 2002 01:39 AM UTC

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)); >

Administrator [Syncfusion]
Replied On November 21, 2002 06:38 AM UTC

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;