How to synchonize data to a GridDataBoundGrid

I am using the "Cust Virt Demo" example in the Essential Studio-Windows Forms - Grid Samples as a template for my application.

I am basically showing information from a List in the GDBG much like the demo.

I wanted to know how best to synchronize the data in the list after an object's value in the list has changed.

Currently I have to listen for any changes on the objects in the list and when a change occurs, I am trying to find the row where the data is displayed and then refresh that cell location in the virtual GDBG.

Is there some functionality within GDBG that allows me to do this?

Thanks


1 Reply

YV Yuvaraja V Syncfusion Team December 20, 2010 12:42 PM UTC

Hi Ha Nguyen,

Thank you for your interest in Syncfusion Products.

To refresh the data in the list after the list has changed, you could make use of EndInit() method in "Model.CellsChanged" event. The following code illustrates the same.

this.gridDataBoundGrid1.Model.CellsChanged += new Syncfusion.Windows.Forms.Grid.GridCellsChangedEventHandler(Model_CellsChanged);

void Model_CellsChanged(object sender, Syncfusion.Windows.Forms.Grid.GridCellsChangedEventArgs e)
{
this.gridDataBoundGrid1.InvalidateRange(GridRangeInfo.Row(this.gridDataBoundGrid1.CurrentCell.RowIndex));
this.gridDataBoundGrid1.EndInit();
}


Here is the sample for your reference.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=UpdationProblem1992932942.zip

Please let us know if this helps.

Regards,
Yuvaraja V.





Loader.
Up arrow icon