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

GridGroupingControl Group Caption Row

Hi, How can I stop the GridGrouping control showing a particular grouped caption row (the row with the plusminus cell. I would like to see the all items in the particular group instance. Thanks Dev.

5 Replies

AD Administrator Syncfusion Team October 1, 2004 10:26 AM UTC

Hi Dev, Try to locate the column that is associated with that group (the one you used for GroupedColumns.Add(fieldName). The column has GroupOptions. You can then set tableDescriptor.Columns[groupByFieldName].GroupOptions.ShowCaptionPlusMinus = false Stefan


DH Devshi Halai October 1, 2004 11:05 AM UTC

Hi Stefan, I don''t think this is what I want. I''ll explain in a bit more detail taking the Group customer example [-] Country: Argentina - 3 item(s) (I don''t wan to see this row, however I want to see all the items in the group) Item1 (I want to see this) Item2 (I want to see this) Item3 (I want to see this) [+] Country ( I want to see this) Item1 Item2 Item3 I don''t want to show the top most grouped item caption, i this case Argentina, however I want to see all the items contained within in the Country Argentina. Hope this makes some sense. Thanks Dev.


DH Devshi Halai October 5, 2004 04:58 AM UTC

Hi Stefan, Any further ideas on this. Dev.


AD Administrator Syncfusion Team October 5, 2004 07:46 AM UTC

So, basically you do not want to hide all captions on the same grouping-level only individual ones. Correct? To to this you will have to derive a class from GridGroup . In your derived classes you need to override IsChildVisible. Something like this: public override bool IsChildVisible(Element el) { if (el is CaptionSection && el.ParentGroup.CatgoryKey.ToString() == "Argentina") return false; if (el is CaptionRow && el.ParentGroup.CatgoryKey.ToString() == "Argentina") return false; else if (el is DetailsSection && el.ParentGroup.CatgoryKey.ToString() == "Argentina") return true; // Otherwise default behavior: return base.IsChildVisible(el); } The GroupingPerf example shows how to derive a class from GridEngine and register that class. In that class you need to override the CreateGroup override. Stefan


AD Administrator Syncfusion Team November 4, 2004 08:32 AM UTC

Hi, Thanks, this is working as expected apart from one issue, I seem to loose the custom caption text which I''ve setup. _groupingGrid.ChildGroupOptions.CaptionText = "{Category} [{RecordCount} items]"; This seems to get reset to the default when I use the derived GridEngine. Regards, Dev.

Loader.
Live Chat Icon For mobile
Up arrow icon