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

GGC disable groupchanging and filter event

Thread ID:

Created:

Updated:

Platform:

Replies:

73980 May 27,2008 10:54 PM UTC Jun 30,2008 11:21 AM UTC WinForms 3
loading
Tags: GridControl
Pravin Patel
Asked On May 27, 2008 10:54 PM UTC

Hi,
How can I disable events when a column is dragged in/out of grid group drop area, and filter set/unset so that I can select columns and filters and then click my load/refresh button so that grouping and filters are applied to avoid grouing/filter applied each time a column is added/removed and filter is set/unset

Thanks
Pravin


haneefm [Syncfusion]
Replied On May 28, 2008 05:47 AM UTC

Hi Pravin,

You can avoid columns being grouped at runtime by handling the TableControlQueryAllowGroupByColumn event of the GridGroupingControl. This will help you in preventing the columns being dragged to the GroupDropArea to group according to them.

void gridGroupingControl1_TableControlQueryAllowGroupByColumn(object sender, GridQueryAllowGroupByColumnEventArgs e)
{
e.AllowGroupByColumn = false;
}


///OR

To prevent the specified column being grouped by setting this code

this.gridGroupingControl1.TableDescriptor.Columns[“ColumnName”].AllowGroupByColumn = false;

For Filter:
Use this code:
this.gridGroupingControl1.TableDescriptor.Columns[“ColumnName”].AllowFilter = false;

Best regards,
Haneef



Pravin Patel
Replied On May 28, 2008 05:19 PM UTC

Hi Haneef,

I want users to allow drag/drop column from grid group drop area, set group order also allow set/unset filters and once done with all selection then do grouping/filtering on button click.

Pravin


Sri Rajan [Syncfusion]
Replied On June 30, 2008 11:21 AM UTC

Hi Pravin,

Thank you for your continued interest in Syncfusion products.

Please refer the below code to add group and filter through button click event.

private void buttonAdv1_Click(object sender, EventArgs e)
{
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Col1");
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;
this.gridGroupingControl1.TableDescriptor.Columns["Col1"].AllowFilter = true;
}


Please let me know if this helps.

Best Regards,
Srirajan


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.

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

;