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.

Disable Grouping with certain columns

Thread ID:

Created:

Updated:

Platform:

Replies:

78600 Dec 19,2008 03:45 AM Dec 19,2008 05:18 AM Windows Forms 1
loading
Tags: Grouping
Aditi Reshma
Asked On December 19, 2008 03:45 AM

I have 3 columns in GGC.Grouping can be done by first 2 column.I have to restrict choosing 3rd column for grouping.ie.,
Product,Group,Member are the three columns.
grouping should be allowed by both product and group.but disable grouping by member.
how can it be done?


Jisha Joy [Syncfusion]
Replied On December 19, 2008 05:18 AM

Hi Aditi ,

This can be achieved by handling TableControlQueryAllowDragColumn event. You can check for the e.Column for column name and set e.AllowDrag property to false.

See the code:

this.gridGroupingControl1.TableControlQueryAllowDragColumn += new GridQueryAllowDragColumnEventHandler(gridGroupingControl1_TableControlQueryAllowDragColumn);


void gridGroupingControl1_TableControlQueryAllowDragColumn(object sender, GridQueryAllowDragColumnEventArgs e)
{
if (e.Column == "Member")
{
e.AllowDrag = false;
}


}

Regards,
Jisha


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.

;