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

GridControl Cell Refresh

Hi All,
I am using Refresh() to refresh Syncfusion.Windows.Forms.Grid.GridControl data if any real-time update. I think that is not a good way to refresh the whole grid data once data is arrived. Kindly to know if any way only to refresh the cell text instead of whole Grid?
Thanks.
Derek


4 Replies

AD Administrator Syncfusion Team May 6, 2008 12:14 PM UTC


Hi Derek,

Thanks for the interest in Syncfusion Grid.

You can refresh a cell rather than the whole grid. You can get the CurrentCell of the grid and can refresh the Grid. Please refer the following code snippet that shows how we can refresh the CurrentCell of the Grid on mouse click.


private void gridControl1_MouseUp(object sender, MouseEventArgs e)
{
GridCurrentCell currentCell = this.gridControl1.CurrentCell;
this.gridControl1[currentCell.RowIndex,currentCell.ColIndex].Text = "Refresh";
currentCell.Refresh();
}


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/I73403/main.htm

Please let me know if you have any questions.

Regards,
Asem.




AD Administrator Syncfusion Team May 29, 2008 06:51 AM UTC

Hi Asem,
Thanks for the information. However, the cell is only refreshed when you click on it. I would like to know if any way to refresh the cell if my grid have real time update.
Thanks,
Derek

>
Hi Derek,

Thanks for the interest in Syncfusion Grid.

You can refresh a cell rather than the whole grid. You can get the CurrentCell of the grid and can refresh the Grid. Please refer the following code snippet that shows how we can refresh the CurrentCell of the Grid on mouse click.


private void gridControl1_MouseUp(object sender, MouseEventArgs e)
{
GridCurrentCell currentCell = this.gridControl1.CurrentCell;
this.gridControl1[currentCell.RowIndex,currentCell.ColIndex].Text = "Refresh";
currentCell.Refresh();
}


Please refer the sample in the below link that illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Windows/I73403/main.htm

Please let me know if you have any questions.

Regards,
Asem.






SR Sri Rajan Syncfusion Team June 30, 2008 07:07 AM UTC

Hi Derek,

Thank you for your interest in Syncfusion products.

You need to call RefreshRange method to refresh a particular cell in the place where you perform realtime update. Here is the sample code.

this.gridControl1.RefreshRange(GridRangeInfo.Cell(1, 1));


Please refer the below browser sample which deals with real time update and refresh grid.

Grid Samples-->Performance Samples--> RefreshGrid

Path in Local Disk:
\My Documents\Syncfusion\EssentialStudio\{Version Number}\Windows\Grid.Windows\Samples\2.0\PerformanceSamples\RefreshGrid

Please let me know if this helps.

Best Regards,
Srirajan



SB solmaz Bahramian October 21, 2008 10:54 AM UTC

hi;
i wrote this method in mylistview_selectedindexchange() event because i want refresh my combo box Column in Control grid refresh after selecting new item of list view.but unfortunately it does't work again. plz help me !


Loader.
Live Chat Icon For mobile
Up arrow icon