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

UseDefaultsForFasterDrawing = true causing null reference exception

Thread ID:





52735 Dec 4,2006 05:15 AM UTC Dec 6,2006 04:00 AM UTC WinForms 1
Tags: Grouping
James Blibo
Asked On December 4, 2006 05:15 AM UTC

I am using a custom engine with the ggc. I have a couple of summary rows above header row.
I keep getting a NullReferenceException error when I make a edit a cell in the grid that would cause the summary row to autocalc.

The error occurs in the method below at the last line (el.ParentGroup.IsExpanded).

public override bool IsChildVisible(Element el)
if (el is ExtraSection)
return el.ParentGroup.IsExpanded; // here you can specify when the extra section is visible.

else if (el is CaptionSection)
return true;

return el.ParentGroup.IsExpanded;

When I add a null check in this method I noticed that the summary row was not auto-calcing... so definitely something is wrong.
The culprint turns out to the the OptimizeGrid method, which I copied from one of your samples.

Apparently, when I comment out the line below..

this.gridGroupingControl1.UseDefaultsForFasterDrawing = true;

, the summary rows auto-calc fine, but when I leave it in, the app blows an exception.

Can you all please help

here's my exact OptimizeGrid method...

this.gridGroupingControl1.CounterLogic = EngineCounters.YAmount;
this.gridGroupingControl1.AllowedOptimizations = EngineOptimizations.DisableCounters | EngineOptimizations.RecordsAsDisplayElements;
this.gridGroupingControl1.UseDefaultsForFasterDrawing = true; // GDI interop drawing, FirstNRecords Summaries
this.gridGroupingControl1.InvalidateAllWhenListChanged = false; // only paint modified cells
this.gridGroupingControl1.InsertRemoveBehavior = GridListChangedInsertRemoveBehavior.InvalidateAll;
this.gridGroupingControl1.UpdateDisplayFrequency = 1; // update every number of ms (speciy 0 if Update should be called manually)
this.gridGroupingControl1.TableControl.EnableDoubleBufferSurface(); // reduce flickering

Administrator [Syncfusion]
Replied On December 6, 2006 04:00 AM UTC

Hi James,

Your incident #30229 has been updated. Please refer to the incident #30229 for more details.



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

or the page will be automatically redirected to 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