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

How do you prevent a readonly datagrid column from being selected

Thread ID:

Created:

Updated:

Platform:

Replies:

69374 Oct 25,2007 04:17 PM UTC Oct 25,2007 08:42 PM UTC WinForms 1
loading
Tags: Tools
Chad William
Asked On October 25, 2007 04:17 PM UTC

I have a Datagrid with several ReadOnly columns. The problem is that I am still able to click in the columns. I can't change anything, but I need to be able to disable the ability to even click in the columns.

Basically, it should be as if the datagrid is set Enabled=False, but only for specific columns.

Is there a way to do this?

haneefm [Syncfusion]
Replied On October 25, 2007 08:42 PM UTC

Hi Chad,

Try setting the Clickable and Enabled property of the GridStyleInfo object to False in a readonly grid cell. Here are the codes that shows this task

For GridControl :
>>>>>>>>>>>>>>
this.grid.ColStyles[1].Clickable = false;
this.grid.ColStyles[1].Enabled =false;

For GridDataBoundGrid:
>>>>>>>>>>>>>>>>>>>>
this.grid.Binder.InternalColumns[1].StyleInfo.Clickable = false;
this.grid.Binder.InternalColumns[1].Enabled =false;

For GroupingGrid :
>>>>>>>>>>>>>>>>
this.grid.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.Clickable = false;
this.grid.TableDescriptor.Columns[1].Appearance.AnyRecordFieldCell.Enabled =false;

Best regards,
Haneef

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

;