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 and perfomance implications

Thread ID:





55003 Jan 22,2007 05:51 PM UTC Jan 22,2007 11:20 PM UTC WinForms 3
Tags: Grouping
James Blibo
Asked On January 22, 2007 05:51 PM UTC

The QueryCellStyleInfo event is being raised for a lot of other events that is not related directly to the ggc,... mouseover, form resize, I believe you all are performing hit tests...

When I mouse over the grid or scroll the grid or resize the form, the QueryCellStyleInfo is being raised. That is a lot of event. I would like to handle the QueryCellStyleInfo once when the grid is initialize and only raised or execute this event when a direct update is made to the grid.

What would be the ideal way to minimize the impact of QueryCellStyleInfo and not have it raise or execute to its fullest when the grid is mouseover, form is resize, ectera.

Would this have any effects on the grid. I have a summary row calculation in the QueryCellStyleInfo event which I must handled when a direct update is made to the the grid. the method is like... other that that, I see no reason while this event should be raise when the grid is mouseovered.

Please advise...

if (rowIndex == rowIndexSpotSummary || rowIndex == rowIndexDollarSummary || rowIndex == rowIndexHHSummary || rowIndex == rowIndexGntSummary || rowIndex == rowIndexPercentDollarSummary)
#region MyRegion
if (el is GridSummaryRow)
GridTable table;
GridSummaryRowDescriptor summaryRowDescriptor;
GridSummaryColumnDescriptor summaryColumn;
SummaryDescriptor sd;

table = el.ParentTable as GridTable;
summaryRowDescriptor = table.TableDescriptor.SummaryRows["SpotSummaryRow"];
summaryColumn = summaryRowDescriptor.SummaryColumns["_Spot_TotalDollar"];

double TotalDollar = 0.0;
if (summaryColumn != null)
sd = summaryColumn.SummaryDescriptor;
if (sd != null)
int index = table.TableDescriptor.Summaries.IndexOf(sd);
ISummary sum = el.ParentGroup.GetSummaries(table)[index];
TotalDollar = ParseHelper.ParseToDouble(summaryColumn.GetDisplayText(sum));
} e.Style.Text = TotalDollar;

e.Handled = true;

Administrator [Syncfusion]
Replied On January 22, 2007 06:50 PM UTC

Hi James,

Thanks for being patience.

This event will get triggered for each cell before a GridTableControl starts painting and allows the users to customize the display of cells. This event only triggered for the cells that are being displayed on screen ( only on demand ).

When mouse over or resize of form causes some cells to be drawn or redrawn which causes triggering of this event. So with proper conditional statements in the event, the unnecessary execution of the code can be avoided.

Please refer to the following forum thread which discusses some property settings which reduces the querycellstyleinfo event being triggered for number of times for record rows. http://www.syncfusion.com/support/forums/message.aspx?MessageID=22490

Kindly let us know if you need any further assistance.
Have a nice day.

Best regards,

James Blibo
Replied On January 22, 2007 07:31 PM UTC

Is the an event that I can subscribe to that will tell me when the ggc databinding operation has completed and has be be fully drawn.

James Blibo
Replied On January 22, 2007 11:20 PM UTC

I have something like this...

this.gridGroupingControl1.DataSource = dtLine;
this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);

log.Debug("end... InitializeAndBindLineGrid... ");

However, when I check the event log, the QueryCellInfo events are all firing long after the Form_Load event.

How can I determine when all the events of the ggc has fired when the ggc is loaded or databounded?


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