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

GridListControl Cell : Should not allow new value

Thread ID:





88809 Aug 12,2009 03:25 PM UTC Aug 20,2009 07:19 AM UTC WinForms 1
Tags: GridControl
Santosh U
Asked On August 12, 2009 03:25 PM UTC


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.


Rajadurai C [Syncfusion]
Replied On August 20, 2009 07:19 AM UTC

Hi Piyush,

Thanks for your interest in Syncfusion Products.

In GridListControl celltype, there is no property support available similar to 'AllowNewText' of ComboBoxAdv control. Since ComboBoxAdv is a tools control designed to handle as seperate control, this property has been implemented in it. However, if you would like to achieve similar functionality in GridListControl celltype in grid, you can handle TableControlCurrentCellKeyPress event with the following code.

bool b;
GridCurrentCell cc = e.TableControl.CurrentCell;
if (cc.Renderer is GridDropDownGridListControlCellRenderer)
GridDropDownGridListControlCellRenderer rend = cc.Renderer as GridDropDownGridListControlCellRenderer;
b = false;
string s = rend.ControlText+"" + e.Inner.KeyChar.ToString();
foreach (string item in dept)
if (item.StartsWith(s,StringComparison.CurrentCultureIgnoreCase))
b = true;
if (!b)
e.Inner.Handled = true;
e.Inner.Handled = false;

Here is a sample for your reference in which this code has been implemented.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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