Make Column read only in EditMode

Hello, is this possible in the "in row" edit mode? To not turn a column into a textbox but instead keep a normal label where the user can't edit?

Thank you

3 Replies

BM Bharath M Syncfusion Team August 19, 2010 12:18 PM UTC

Hi Matthias,

Thank you for your interest in Syncfusion products.

We suggest you to set the "ReadOnly" property of ColumnDescriptor as "true", to achieve your requirement. Please refer the below code snippet to describe this.

[CS]

this.GridGroupingControl1.TableDescriptor.Columns.FindByMappingName("ColumnName").ReadOnly = true;

Let me know if you have any concerns.

Regards,
Bharath M


MM Matthias Max August 19, 2010 02:50 PM UTC

Thanks! worked perfect!

How do I define the type of control being used in Row Edit Mode (see my other post) ?

Bye


BM Bharath M Syncfusion Team August 20, 2010 06:47 AM UTC

Hi Matthias,

Thanks for the update.

We have provided several in-built cell types for user convenience, which can be set by the code below:

[CS]
//TextBox is default value for “String” data
this.GridGroupingControl1.TableDescriptor.Columns.FindByMappingName("ColumnName"). Appearance.AnyRecordFieldCell.CellType = "TextBox";

The possible values for CellType is as follows

1. ComboBox – Need to Set “AnyRecordFieldCell.DataSource/ValueMember”
2. Image - ImageUrl could be specified using “AnyRecordFieldCell.ImageUrl”
3. MaskEdit - Mask could be modified by using “AnyRecordFieldCell.MaskEdit.Mask = “###"”
4. CheckBox - This automatically generated when Boolean values are bound to grid
5. NumericUpDown – For Integer DataType
6. MonthCalendar – For DateTime type

We also provide support to place your custom control on edit mode. To set your custom control for edit mode, please set your ITemplates to ‘Columns.FindByMappingName("ColumnName"). EditItemTemplate’.

Let me know if you have any concerns.

Regards,
Bharath M

Loader.
Up arrow icon