AD
Administrator
Syncfusion Team
December 9, 2005 05:30 PM UTC
Yes. I think you would have ot use a timer. Here is a try at this.
http://www.syncfusion.com/Support/user/uploads/GDBC_Second_23f37646.zip
E.
e.davidse
December 12, 2005 07:46 AM UTC
The timer I had already working. the problem is that the change is NOT comming from user input but directly from the datasource. We are using the grid only for visualisation.
I can''t upload code to you easly so This is what I want to try:
private Timer _timer = new Timer();
private void Form1_Load(object sender, System.EventArgs e)
{
...
_timer.Interval = 100;
_timer.Tick +=new EventHandler(_timer_Tick);
}
private void _timer_Tick( object sender, EventArgs e )
{
Random rand = new Random();
int rowIndex = rand.Next( 0, ((DataTable)this.gridDataBoundGrid1.DataSource).Rows.Count );
DataRow row = ((DataTable)this.gridDataBoundGrid1.DataSource).Rows[ rowIndex ];
row["Col1"] = "Change";
}
The problem is that I now don''t know which cell is changed. And update the entire grid is not an option. there are just to much changes. We are facing +200 cell changes a second.
+/- 40 visable row with 15 cols.
And we would like to use the databound grid because the support for sorting and filtering.
Is this reasonable to do with the databound grid or do we need to implement it all ourself. ( timeconsuming )
>Yes. I think you would have ot use a timer. Here is a try at this.
>
>http://www.syncfusion.com/Support/user/uploads/GDBC_Second_23f37646.zip
>
AD
Administrator
Syncfusion Team
December 12, 2005 10:20 AM UTC
You have to listen to an event on the datasource that catches these outside changes to the datasource. In this event handler, you add the changed items along with a timestamp to some datastore. Then from within a timer loop in your form, you check this datastore to see whether items shown be removed and and refresh the grid for each of these items so PrepareViewStyleInfo can properly set the colors. Here is a little sample.
http://www.syncfusion.com/Support/user/uploads/GDBC_Second_70d51930.zip