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.

Change grouping

Thread ID:

Created:

Updated:

Platform:

Replies:

98999 Apr 15,2011 10:11 AM May 9,2011 01:07 AM Windows Forms 3
loading
Tags: Grouping
Tomio
Asked On April 15, 2011 10:11 AM

Hi, How do I block a group of two columns, if you have a column grouped and the user from any other group in place.

"to put the grid outar remove the column that was already in the group" gridGroupingControl in VB.NET?

Follows as an attachment I want.

Thanks



What I want and I do not want_aaa4b968.zip

Jisha Joy [Syncfusion]
Replied On April 21, 2011 07:03 AM

Hi,

You can achieve the desired behavior by handling the TableControlQueryAllowGroupByColumn event. It Occurs when the user drags a column header over the GroupDropArea. In your event handler, you can determine if the grid can be grouped by the selected column.

Regards,
Jisha


Tomio
Replied On April 25, 2011 04:37 PM

Good afternoon.
Thanks for the help, but I've already.
The code is as follows:

Private Sub gridGrouping_TableControlQueryAllowGroupByColumn(ByVal sender As System.Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowGroupByColumnEventArgs) Handles gridGrouping.TableControlQueryAllowGroupByColumn

e.AllowGroupByColumn = False

If e.Reason = GridQueryAllowDragColumnReason.MouseUp Then

gridGrouping.TableDescriptor.GroupedColumns.Clear()

gridGrouping.TableDescriptor.GroupedColumns.Add(e.Column)

End If

End Sub

Regards,
Tomio



Arulraj A [Syncfusion]
Replied On May 9, 2011 01:07 AM

Hi Tomio,

Thanks for the update

You can achieve the required behaviour by clearing the grouped columns collection in TableControlQueryAllowGroupByColumn event. The following code explains the same.

Private Sub gridGrouping_TableControlQueryAllowGroupByColumn(ByVal sender As System.Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowGroupByColumnEventArgs) Handles gridGrouping.TableControlQueryAllowGroupByColumn

Me.gridGroupingControl1.TableDescriptor.GroupedColumns.Clear()

End Sub


Regards,
Arulraj.A




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.

;