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. Image for the cookie policy date

Disabling Header Selection GridgroupingControl

Is there a way to turn off selection of group / header rows in a gridgroupingcontrol? Below is the properties I have set.

this.ggcDWP.TableOptions.AllowDropDownCell = false;
this.ggcDWP.TableOptions.AllowSelection = ((Syncfusion.Windows.Forms.Grid.GridSelectionFlags)((Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Row | Syncfusion.Windows.Forms.Grid.GridSelectionFlags.AlphaBlend)));
this.ggcDWP.TableOptions.ListBoxSelectionColorOptions = Syncfusion.Windows.Forms.Grid.Grouping.GridListBoxSelectionColorOptions.DrawAlphablend;
this.ggcDWP.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One;

4 Replies

AD Administrator Syncfusion Team March 26, 2007 05:28 PM UTC

Try changing the AllowSelection property to none to see if this gives you what you want. By doing so, you indicate that the grid should use the record selection architecture specific to GridGroupingControl instead of the more general cell selection support inherited from GridControlBase.

this.gridGroupingControl1.TableOptions.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;


MI Mike March 26, 2007 09:23 PM UTC

Thanks for the response.

Unfortunately, this still allows selection of the grouping rows.

Focus is moved to the + - buttons on the grouping row.

Any other suggestions?


>Try changing the AllowSelection property to none to see if this gives you what you want. By doing so, you indicate that the grid should use the record selection architecture specific to GridGroupingControl instead of the more general cell selection support inherited from GridControlBase.

this.gridGroupingControl1.TableOptions.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;


AD Administrator Syncfusion Team March 27, 2007 10:58 AM UTC

If you do not want the focus to go to the +/- cell, you can handle the TabelControlCellClick event and cancel it for any cell that you do not want to accept a click. Here is a little sample.

http://www.syncfusion.com/Support/user/uploads/WindowsApplication106_83f157a8.zip


MI Mike March 30, 2007 07:51 PM UTC

Thanks for the response.

While this example doesn't allow selection of the groups it still removes focus from the record when you click on a grouping row. Is there anyway to prevent that?

Thanks again

>Is there a way to turn off selection of group / header rows in a gridgroupingcontrol? Below is the properties I have set.

this.ggcDWP.TableOptions.AllowDropDownCell = false;
this.ggcDWP.TableOptions.AllowSelection = ((Syncfusion.Windows.Forms.Grid.GridSelectionFlags)((Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Row | Syncfusion.Windows.Forms.Grid.GridSelectionFlags.AlphaBlend)));
this.ggcDWP.TableOptions.ListBoxSelectionColorOptions = Syncfusion.Windows.Forms.Grid.Grouping.GridListBoxSelectionColorOptions.DrawAlphablend;
this.ggcDWP.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One;

Loader.
Live Chat Icon For mobile
Up arrow icon