Gridview, a fundamental component in web development, becomes even more powerful when enhanced with a ComboBox within the CellEditorInitialize event. This blog post aims to unravel the capabilities and intricacies of integrating a Gridview ComboBox in CellEditorInitialize Event
protected void gvName_CellEditorInitialize(object sender,
DevExpress.Web.ASPxGridViewEditorEventArgs e)
{
if (e.Column.FieldName == "ColumnName")
{
ASPxComboBox combo = e.Editor as ASPxComboBox;
combo.DataSource = null;
combo.DataBind();
combo.DataSource =
obj.GetProdByCompany(Convert.ToString(cmbCompany.Value));
combo.DataBind();
}
}
Bind Data To DevExpress Gridview ComboBox in CellEditorInitialize Event