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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

84447 Jun 30,2009 04:55 PM Jul 6,2009 09:23 AM Windows Forms 3
loading
Tags: GridControl
David Cui
Asked On June 30, 2009 04:55 PM


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

Jisha Joy [Syncfusion]
Replied On July 1, 2009 02:19 AM

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

David Cui
Replied On July 1, 2009 09:22 AM


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

Rajadurai C [Syncfusion]
Replied On July 6, 2009 09:23 AM

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

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.

;