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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

QueryCellStyleInfo called twice for same row

Thread ID:

Created:

Updated:

Platform:

Replies:

49347 Sep 16,2006 02:51 AM UTC Sep 19,2006 07:17 AM UTC WinForms 1
loading
Tags: Grouping
jamesb
Asked On September 16, 2006 02:51 AM UTC

I have the following snippet in my form. However, I noticed that QueryCellStyleInfo is called twice for the same summary row.

if (el is GridSummaryRow)
{


GridSummaryColumnDescriptor sdd = e.TableCellIdentity.Table.TableDescriptor.SummaryRows["SummaryRowCaption"].GetSummaryColumnAtCol(e.Style.TableCellIdentity.ColIndex);
if (sdd != null)
{
SummaryDescriptor sdd1 =sdd.SummaryDescriptor;
string c = sdd.DisplayColumn;

if (sdd1 != null)
{
int indexOfSd = this.gridGroupingControl.Table.TableDescriptor.Summaries.IndexOf(sdd1);
Int32AggregateSummary summary1 = (Int32AggregateSummary)e.TableCellIdentity.DisplayElement.ParentGroup.GetSummaries(table)[indexOfSd1];
e.Style.Text = string.Format("{0:n}", summary1.Sum);

}

}
}

Administrator [Syncfusion]
Replied On September 19, 2006 07:17 AM UTC

Hi James,

The QueryCellStyleInfo is called whenever the grid needs a cell style for any reason. It should not be called for every cell if only one cell is changed from code. But if you move your mouse over the grid, it will be called as the mouse moves (the grid needs the cell style to do hittesting). Or, if you call Refresh or Invalidate then QueryCellIStylenfo would be hit more.

Let me know if this helps.
Best Regards,
Haneef

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

;