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.

Programatically do grouping, and detect user-grouping

Thread ID:

Created:

Updated:

Platform:

Replies:

19975 Oct 7,2004 02:31 AM Oct 8,2004 01:16 AM Windows Forms 2
loading
Tags: Grouping
Dominic Morris
Asked On October 7, 2004 02:31 AM

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 06:09 AM

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 01:16 AM

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.

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.

;