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.

Make column editable

Thread ID:

Created:

Updated:

Platform:

Replies:

63528 Jul 5,2007 02:56 AM Jul 5,2007 09:54 PM Windows Forms 4
loading
Tags: Grouping
Patrick Cheng
Asked On July 5, 2007 02:56 AM

Hi,

I have a GGC set up where I want to make one column editable and the rest are not. I have tried using this code:

GridTableDescriptor td = e.TableCellIdentity.DisplayElement.ParentTableDescriptor as GridTableDescriptor;
td.Columns["Price"].Appearance.AnyRecordFieldCell.ReadOnly = false;

but nothing happens. Can you please give an example of how to programmatically set specific columns to be editable.

Administrator [Syncfusion]
Replied On July 5, 2007 04:12 AM

Here is a sample that has a checkbox that uses the QueryCellStyleInfo event to set a particular column editable in an otherwise ReadOnly grid.


GGC_ReadOnlyColumn.zip

Patrick Cheng
Replied On July 5, 2007 08:32 AM

Hi Clay,

I;ve tried the approach you provided and it allows the cell color to change, but does not make the cell editable.

Can you think of another way for this?

Administrator [Syncfusion]
Replied On July 5, 2007 02:50 PM

The sample I uploaded does not provide an editable column 2 for you when you click the checkbox? If not, then what version of our libraries are you using? I tried the sample with 5.1.1.12 and the column become editable for me.


Another way to make a column editable is to set:

grid.TableDescriptor.Columns["ColumnName"].ReadOnly = false;



Patrick Cheng
Replied On July 5, 2007 09:54 PM

Hi Clay,

It seems that the problem was with another issue all this time. It seemed that previously in the code, the grid cells were all set to static, which caused the ReadOnly flag not to trigger. Once I took out the static code, the column I want to make editable works.

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.

;