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.

How do you prevent a readonly datagrid column from being selected

Thread ID:





69374 Oct 25,2007 12:17 PM Oct 25,2007 04:42 PM Windows Forms 1
Tags: Tools
Chad William
Asked On October 25, 2007 12:17 PM

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 04:42 PM

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,


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.