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

QueryCellStyleInfo called twice for same row

Thread ID:





49347 Sep 16,2006 02:51 AM UTC Sep 19,2006 07:17 AM UTC WinForms 1
Tags: Grouping
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,


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