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

how to not showing Plus/Minus sign for grouping control ?


Hi,

How to disable the Plus/Minus sigh for the grouping ?
Some how I use the following to disable it this.ChildGroupOptions.ShowCaptionPlusMinus = false, It works, but it default to Expanded mode, which I don't expect.

My purpose is to still keep the group expandable and collapsible without showing the plus minus sign (alternative, double click the row to expand or shrink).


David

3 Replies

JJ Jisha Joy Syncfusion Team July 1, 2009 06:19 AM UTC

Hi David,

You could follow the technique in sample "Nested Tables-No Indent Demo" to achieve the desired behavior. This sample allows you to display nested tables in a Grid Grouping control without indenting the children of the records in the parent table. You could hide the default Record Plus-Minus buttons and having them in the same level as the parent.The TableControlCellClick event is responsible for expanding and collapsing the record. You could access the sample from the below location:

..\\My documents\syncfusion\essentialstudio\7.2.0.20\Windows\Grid.Grouping.Windows\Samples\2.0\Appearance\Nested Table-No Indent Demo\cs

Please let me know if this helps.

Thank you for using Syncfusion products.

Regards,
Jisha


DC David Cui July 1, 2009 01:22 PM UTC


Thanks.

maybe i didn't make myself clear:
firstly I didn't use 7.x version yet, i am in 4.2 version.
seconldy, my question is querying the grouping tables (my data source is not nested table). Is that doable ?


David


RC Rajadurai C Syncfusion Team July 6, 2009 01:23 PM UTC

Hi David,

Thanks for your interest in Syncfusion Products.

1) If you would like to disable the groupcaptionplusminuscell, please try to set its celltype to "Static" in QueryCellStyleInfo event. Here is the code for your reference.

this.gridGroupingControl1.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.GroupCaptionPlusMinusCell )
{
e.Style.CellType = "Static";
}
}


2) It is possible to query any group through handling QueryCellStyleInfo event. Please refer to the following code that checks for the grouplevel 2(i.e., second group in the table) and set its caption text as "Hello".

if (e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.GroupCaptionCell)
{
if (e.TableCellIdentity.DisplayElement.GroupLevel == 2)
{
e.Style.Text = "Hello";
}
}


Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon