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.

GridListControl Cell : Should not allow new value

Thread ID:

Created:

Updated:

Platform:

Replies:

88810 Aug 12,2009 11:25 AM Aug 13,2009 04:58 AM Windows Forms 1
loading
Tags: GridControl
Santosh U
Asked On August 12, 2009 11:25 AM

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

Jisha Joy [Syncfusion]
Replied On August 13, 2009 04:58 AM

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

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.

;