GridListControl Cell : Should not allow new value

Hi,

I have a GCC in which i have set one column as GridListControl.
I have some data which I am populating from database.

I want to force the user not to enter new value in the cell where the GridListControl is. A user can only type and not enter new, which happens in a ComboBoxAdv control where I can set property AllowNewText = false;

How can I acheive this in GridListControl Dropdown within a cell.
I had gone through the properties using CellRender but could not succeed in it.

Can any one please help me regarding this.

Thanks,
Santosh U

1 Reply

JJ Jisha Joy Syncfusion Team August 13, 2009 08:58 AM UTC

Hi Santosh,

Thankyou for posting query to us.

The desired behavior can be achieved by specifying the DropDownStyle to GridDropDownStyle.Exclusive. See the code to set GridListControl celltype to the grid column, setting datasource to it and setting the DropDownStyle.

this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.CellType = "GridListControl";
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.DataSource = GetTable1();
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.DisplayMember = "ID";
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.ValueMember = "ID";
this.gridGroupingControl1.TableDescriptor.Columns[2].Appearance.AnyRecordFieldCell.DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.Exclusive;

Please let me know if this helps.

Regards,
Jisha

Loader.
Up arrow icon