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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Refreshing the cell

Thread ID:





64792 Jul 24,2007 08:43 AM UTC Jul 24,2007 06:32 PM UTC WinForms 1
Tags: GridControl
Thanvir Hussain
Asked On July 24, 2007 08:43 AM UTC

I have a custom cell renderer which subscribes to some events and in the handler I need to refresh the cell. I do the following to add the handlers
GenNextDateOrTenorModel dtmodel = (GenNextDateOrTenorModel) model;
SyncDatePickerCellRenderer r = (SyncDatePickerCellRenderer)this.m_Grid.CellRenderers["SyncDatePickerCell"];
dtmodel.BaseCCYChanged += new CCYChange(r.CurrencyChangedHandler);
dtmodel.TermCCYChanged += new CCYChange(r.CurrencyChangedHandler);

Now in the handler I can call this.Grid.Refresh()

public void CurrencyChangedHandler(string oldCCY, string newCCY)
// this.Grid.RefreshRange(GridRangeInfo.Cells(this.RowIndex, this.ColIndex, this.RowIndex, this.ColIndex));
System.Diagnostics.Trace.WriteLine("Refresh Called");

But instead of refreshing the entire Grid I need to refresh that cell alone using the RefreshRange function, but the rowindex and colindex are not set when I come into the handler code. Can you please let me know how to do this?

thanks in advance

haneefm [Syncfusion]
Replied On July 24, 2007 06:32 PM UTC

Hi Thanvir,

You can get the RowIndex and ColIndex using the Grid.PointToRowCol method. Below are the code snippet

public void CurrencyChangedHandler(string oldCCY, string newCCY)
int row, col;
if(this.Grid.PointToRowCol(System.Windows.Forms.Control.MousePosition , out row, out col) && row == 0 && col > 0)

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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