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

How to get selected value from EditItemTemplate-Dropdown?

Thread ID:





72837 Apr 8,2008 11:37 AM UTC Apr 10,2008 05:30 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Asked On April 8, 2008 11:37 AM UTC


WhWe have added a dropdown dynamically as in the code below. How do we get the value the user has selected in the drop down when the chenges are saved?

protected void GridControl_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
if (e.TableCellIdentity.Column.Name == ChecklistItemTableColumns.DepartmentID)
DropDownList departmentDropDown = new DropDownList();
departmentDropDown.ID = "m_DepartmentDropDown" + checklistItemID.ToString();
departmentDropDown.DataSource = GetDepartmentDataTable();
departmentDropDown.DataTextField = Department_LVTableColumns.DepartmentName;
departmentDropDown.DataValueField = Department_LVTableColumns.DepartmentID;
departmentDropDown.SelectedValue = e.Style.CellValue.ToString();
departmentDropDown.AutoPostBack = false;

TemplateClass editItemTemplate = new TemplateClass(departmentDropDown);
e.TableCellIdentity.Column.EditItemTemplate = editItemTemplate;


Janagan [Syncfusion]
Replied On April 10, 2008 05:30 AM UTC

Hi Najir,

Thanks for your interest in Syncfusion products.

You can retrieve the values of the dropdown list in edit mode, by the following code below:

protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
DropDownList ddl = sender as DropDownList;
Record rd = GridGroupingControl1.Table.CurrentRecord;

rd.SetValue("City", ddl.SelectedItem.Value);


Please refer the sample in the link below which illustrates the above:


Please try running the sample and let me know if this helps.



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