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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programatically do grouping, and detect user-grouping

Thread ID:

Created:

Updated:

Platform:

Replies:

19975 Oct 7,2004 06:31 AM UTC Oct 8,2004 05:16 AM UTC WinForms 2
loading
Tags: Grouping
Dominic Morris
Asked On October 7, 2004 06:31 AM UTC

Hi, I''d like to programatically setup the grouping grid to group by a given column. How is this done?! Also, I''d like to detect when the user alters the grouping manually by dragging a column header; what event fires when this happens? The reason for the second request, is that when I set TableDescriptor.ChildGroupOptions.ShowCaptionSummaryCells = true, the grouped row containing the +- icon needs its width increased to show the group text; I need to do this programatically in response to the grouping changing. Thanks, D.

Administrator [Syncfusion]
Replied On October 7, 2004 10:09 AM UTC

To programmitically group by a column, you add the column to the GroupedColumns collection. this.gridGroupingControl2.TableDescriptor.GroupedColumns.Add("Col2"); To ne notified of the user do a grouping, you can subscribe to the GroupedColumns.Changed event.
private void GroupedColumns_Changed(object sender, ListPropertyChangedEventArgs e)
{
	SortColumnDescriptor dc = e.Item as SortColumnDescriptor;
	Console.WriteLine(dc.Name + " "  + e.Action.ToString());
}

Dominic Morris
Replied On October 8, 2004 05:16 AM UTC

Thanks Clay! >To programmitically group by a column, you add the column to the GroupedColumns collection. > >this.gridGroupingControl2.TableDescriptor.GroupedColumns.Add("Col2"); > > >To ne notified of the user do a grouping, you can subscribe to the GroupedColumns.Changed event. >
>private void GroupedColumns_Changed(object sender, ListPropertyChangedEventArgs e)
>{
>	SortColumnDescriptor dc = e.Item as SortColumnDescriptor;
>	Console.WriteLine(dc.Name + " "  + e.Action.ToString());
>}
>

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;