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

QueryCellStyleInfo and perfomance implications

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;
return;
}
#endregion
}



3 Replies

AD Administrator Syncfusion Team 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,
Madhan


JB James Blibo 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.


JB James Blibo January 22, 2007 11:20 PM UTC

I have something like this...

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

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

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?

Loader.
Live Chat Icon For mobile
Up arrow icon