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.

AllowSelection = GridSelectionFlags.Column

Thread ID:

Created:

Updated:

Platform:

Replies:

67075 Aug 8,2007 06:04 AM Aug 10,2007 02:59 AM Windows Forms 4
loading
Tags: GridControl
Vladislav Sergeev
Asked On August 8, 2007 06:04 AM

Hi there,

I am trying to do a very simple thing : get a grid to select a full column on caption click.

AllowSelection = GridSelectionFlags.Column | GridSelectionFlags.Whatever

This should work, right? For me it doesn't.

Are some flags mutually exclusive? Are there any properties of GridControl that might prevent the column from being selectable?

Best regards and thankful in advance
Vlad


Administrator [Syncfusion]
Replied On August 8, 2007 03:10 PM

There are a couple of settings that may prevent the selection of Columns when you click a column header in a GridControl or GridDataBoundGrid.

Make sure the styles on the column header do not have style.Enabled = false as this would prevent the click from happening.

Another setting that would interfere with column selections is if you have the ListBoxSelectionMode set to something other than None. Setting this property to something other than None indicates you want only row selections and this will override the AllowSelections.

Vladislav Sergeev
Replied On August 9, 2007 03:29 AM

Thanks for your response, I have made sure that all of the properties are set as you have suggested and still I am not able to select a column. Can you please send me a sample solution where the GridControl would have selectable columns.

Thankful in advance
Vlad

>There are a couple of settings that may prevent the selection of Columns when you click a column header in a GridControl or GridDataBoundGrid.

Make sure the styles on the column header do not have style.Enabled = false as this would prevent the click from happening.

Another setting that would interfere with column selections is if you have the ListBoxSelectionMode set to something other than None. Setting this property to something other than None indicates you want only row selections and this will override the AllowSelections.

Administrator [Syncfusion]
Replied On August 9, 2007 03:53 AM

Below is a sample. You can select columns in a GridControl or GridDataBoundGrid by default. Just drag a GridControl onto your form and run the application. Or, just drag a GridDataBoundGrid onto your form, set its datasource, and then run the application. Then in both cases, you should be able to click a column header and select a column.

Another property you should check is if you have the GridControllerOptions.DragColumnHeader flag set in the grid.ControllerOptions property. If so, then clicking a column header will allow you to drag the column, but will not select it.

WindowsApplication97.zip

Vladislav Sergeev
Replied On August 10, 2007 02:59 AM

Clay

Thank you very much, it was indeed the GridControllerOptions.DragColumnHeader flag that prevented the column from being selected.

Vlad

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.

;