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.
Unfortunately, activation email could not send to your email. Please try again.

Use of custom engine results in unexpected collapse of grid

Thread ID:

Created:

Updated:

Platform:

Replies:

49282 Sep 14,2006 03:18 PM Sep 19,2006 11:30 AM Windows Forms 5
loading
Tags: Grouping
Mohan Ranganna
Asked On September 14, 2006 03:18 PM

Hi,

I am using Syncfusion Grouping Grid Control V3.3 on .NET 1.1.

I implemented the attached custom engine (as per Syncfusion''s suggestion - http://www.syncfusion.com/Support/forums/message.aspx?MessageID=15398) to hide a caption row by making use of IsChildVisible property in my application. But the grouping grid seems to collapse unexpectedly when I enter values in the grid''s cells. When I comment out the custom engine code, it seems to work all right.

Could you please resolve this problem?

Regards,
Mohan

CustomEngine2.zip

Administrator [Syncfusion]
Replied On September 15, 2006 09:00 AM

Hi Mohan,

We haven''t seen the unexpected collapse of the grid record problem of "XP SP2 +VS 2003 version + Essential Studio 3.3.". We have tested with the Essentail Studio many time , but we haven''t reproduce the issue in our system. If you give more information about this issue, we will try debugging here.

Here is a sample(tested in 3.3)
http://www.syncfusion.com/Support/user/uploads/HideNoneCategory_ca1b04c7.zip

Let me know if i am missing something.
Best Regards,
Haneef

Mohan Ranganna
Replied On September 15, 2006 12:25 PM

Hi Haneef,

Thanks for the update and the sample.

I found out that the custom engine broke my implementation of customized expansion and collapse of the grid. I am trying to rectify it now.

I also noticed that the custom engine does not work in unison with GridGroupOptionsStyleInfo.ShowEmptyGroups. I have used ShowEmptyGroups to always display the group header even when the records under the group are filtered out.(Please see my query http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=39832)

When I comment out the custom engine code, I have no problem in displaying the group headers with no records under them but when I implement the custom engine, the group header is not shown if the records under it are filtered out.

Please help.

Regards,
Mohan

Mohan Ranganna
Replied On September 15, 2006 01:26 PM

Hi Haneef,

Continuing with my previous message, I have modified the sample you had sent to reproduce the problem. I have set ShowEmptyGroups to true and I have added a filter to only display those records that have "None". Theoritically, since ShowEmptyGroups is set to true, the grid should display the groups even when the records under them are filtered out.

In the sample, since the records having "None" are displayed and the others filtered out, grouping by any column should display all the group headers but under the groups only records having "None" should be displayed. But it does not happen so. The grid does not display those groups at all. But if you comment out the initialization of GroupingEngineFactory, the grid displays the groups but there are no records under them since I have fiiltered them out.

How do I ensure that the grid does not display the group header for the records that have "None" but at the same time displays the group header even when the records under the group are filtered out?

Regards,
Mohan

HideNoneCategory_ca1b04c70.zip

Administrator [Syncfusion]
Replied On September 18, 2006 02:58 AM

Hi Mohan,

Thanks for your modified sample.

You would have to derive the GridGroup and override the IsGroupVisible() method. Below is a code snippet

protected override bool IsGroupVisible()
{
if( this.GroupOptions.ShowEmptyGroups && this.FilteredRecords.Count == 0 && this.Records.Count > 0 )
return true;
else
return base.IsGroupVisible ();
}

and you need to turn ON the AddNewRecordSection in a group for showing the EmptyGroup add new section.

protected override void OnInitializeSections(bool hasRecords, SortColumnDescriptorCollection fields)
{
// Caption
this.Sections.Add(this.ParentTableDescriptor.CreateCaptionSection(this));
//Details (Add New Records);
this.Sections.Add(this.ParentTableDescriptor.CreateAddNewRecordSection(this));
//you required section here...
}

Modified Sample : http://www.syncfusion.com/Support/user/uploads/HideNoneCategory_297f9089.zip

Let me know if this helps.
Best Regards,
Haneef

Mohan Ranganna
Replied On September 19, 2006 11:30 AM

Hi Haneef,

Thanks a lot for the update and the sample. It did resolve the issue. I was also able to fix the problem with collapsing of the groups. It turned out that the custom engine made all objects of type GridGroup as GroupingGroup since the custom engine returns objects of type GroupingGroup.
Isn''t this something that all those who implement custom engine should take care of?

Regards,
Mohan

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.

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.

;