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

Make column editable

Thread ID:

Created:

Updated:

Platform:

Replies:

63528 Jul 5,2007 06:56 AM UTC Jul 6,2007 01:54 AM UTC WinForms 4
loading
Tags: Grouping
Patrick Cheng
Asked On July 5, 2007 06:56 AM UTC

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 08:12 AM UTC

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 12:32 PM UTC

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 06:50 PM UTC

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 6, 2007 01:54 AM UTC

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.

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

;