Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Bind comboBox to igGrid at runtime
posted

Hi,

I am creating igGird at runtime in the controller(c#). I need a to display combo box in the grid column. Here is the code below:

gridUpdating.ColumnSettings.Add(new ColumnUpdatingSetting
{
ColumnKey = "LastChangedEmployee",
// Required = true,
EditorType = ColumnEditorType.Combo,
ComboEditorOptions = { Mode= ComboMode.DropDown, DataSource= "GetCombo()" }

});

public ActionResult GetCombo()
{
var security = new List<object>
{
new { value=1, text="ADMIN"},
new { value=1, text="ANALYSTS"}
};
return Json(security);

}

Please let me know where I am going wrong.

Parents Reply Children