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

Synchfusion GridGroupingControl painting problem

Thread ID:

Created:

Updated:

Platform:

Replies:

47876 Aug 15,2006 07:25 PM UTC Aug 21,2006 09:31 AM UTC WinForms 8
loading
Tags: GridControl
Aiqun Wu
Asked On August 15, 2006 07:25 PM UTC

I am developing a GUI application using Synchfusion 3.2.1.0 and C#. GridGroupingControl is used for one of the screen. I want the group caption row to be hidden if there is only one record in the group. This is done using custom engine as in Samples\Grouping\ResizableRows example. It works if the datasource is pre-populated. But if I hook up real-time data, the painting is not refreshed properly once a single record group is created. For example,

group1
record1
record2

If a group2 having one record is added, the following is shown initially,

group1
g1_record1
g1_record2
group2
g2_record1

Minimize the window and restore it, the window displays

group1
g1_record1
g1_record2
g2_grecord1

which is what I want.

Thanks

Aiqun

Administrator [Syncfusion]
Replied On August 16, 2006 05:19 AM UTC

Hi Aiqun,

Please refer to the following forum thread, which discuss related to this issue.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=45803

Let me know if this helps.
Thanks,
Haneef

Aiqun Wu
Replied On August 16, 2006 03:48 PM UTC

I still could not resolve my problem after reading the thread.
Here is little sample code that demonstrate the problem. Please check to see what I am doing wrong.

I actually upgraded to 4.2 from 3.2.1. It is still a problem.

Thanks

>Hi Aiqun,

Please refer to the following forum thread, which discuss related to this issue.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=45803

Let me know if this helps.
Thanks,
Haneef

GroupingGrid.zip

Administrator [Syncfusion]
Replied On August 17, 2006 09:11 AM UTC

Hi Aiqun,

The reason is that when the SourceList is changed ( the record is added ), it was re-initialized and the engine was not informed any thing about the condition and row height at that time. You can try checking the condition dynamically and hide the GroupCaption using GroupingEngine. Please refer the below KB article for more details.

KB : http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=363

Let me know if this helps.
Best Regards,
Haneef

Aiqun Wu
Replied On August 17, 2006 08:52 PM UTC

Haneef,

Can you post a sample to check the condition dynamically and hide the GroupCaption using GroupingEngine? I tried not to create caption section, or play with visibleCounters, but couldn''t figure out a way to work.

Thanks

Aiqun

>Hi Aiqun,

The reason is that when the SourceList is changed ( the record is added ), it was re-initialized and the engine was not informed any thing about the condition and row height at that time. You can try checking the condition dynamically and hide the GroupCaption using GroupingEngine. Please refer the below KB article for more details.

KB : http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=363

Let me know if this helps.
Best Regards,
Haneef

Aiqun Wu
Replied On August 17, 2006 11:08 PM UTC

Sorry, I miss the sample from kb, GGC_CustomEngineForGroupOneRow. It seems what I wanted. A quick question. Why derive from Group instead of GridGroup?

Thanks


>Haneef,

Can you post a sample to check the condition dynamically and hide the GroupCaption using GroupingEngine? I tried not to create caption section, or play with visibleCounters, but couldn''t figure out a way to work.

Thanks

Aiqun

>Hi Aiqun,

The reason is that when the SourceList is changed ( the record is added ), it was re-initialized and the engine was not informed any thing about the condition and row height at that time. You can try checking the condition dynamically and hide the GroupCaption using GroupingEngine. Please refer the below KB article for more details.

KB : http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=363

Let me know if this helps.
Best Regards,
Haneef

Aiqun Wu
Replied On August 18, 2006 03:25 AM UTC

Haneef,

I notice a couple of problems with the approach,

1. The expand state is not preserved after new records added. It is always collapsed. Is there a way to preserve it?

2. I noticed the comments in the sample states that the custom group engine is a trimmed down version of GridGroup. I am not sure what functionality is lost, but at least the following property does not work anymore,

grid.TopLevelGroupOptions.IsExpandedInitialValue = true;

I tried to change the base class from Group to GridGroup, but it does not work (throw exception). Is there a fundamental reason not to derive from GridGroup? If so, what subset of functionality is lost?

Thanks

Aiqun Wu
Replied On August 18, 2006 06:56 PM UTC

It looks like setting TableDirty = true caused the expand state reset. If I don''t set TableDirty to true, setting property IsExpandedInitialValue will have problem when adding a row belong to a new group.

I found a way that seems works. In OnInitializeSections function, I call SetExpanded(bool, false, false). Is it the correct way to do it?

Thanks


Administrator [Syncfusion]
Replied On August 21, 2006 09:31 AM UTC

Hi Aiqun,

My apologies for the delay in response.

I think calling SetExpanded in OnInitailizeSections should be OK (as long as you call it after any call to the base class if you have one). OnInitializeSections is where IsExpandedInitialValue is used in our standard library.

Thanks for your patience.
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

;