|
col.Field("ShipName").HeaderText("ShipName").Width(150).Add();
col.Field("ShipCountry").HeaderText("ShipCountry").Width(90).EditType(EditingType.Dropdown).Add();
})
.ClientSideEvents(eve => { eve.ActionComplete("complete"); })
)
<script type="text/javascript">
var skills = [{
skill: "Cabbage",
category: "Leafy and Salad"
},
. . . .
{
skill: "Turmeric",
category: "Root and Tuberous"
}];
function complete(args){
if (args.requestType == "beginedit")
//GridID + ColumnName
$("#EditingEmployeeID").ejDropDownList({
watermarkText: "Select a vegetable",
enableFilterSearch: true, // to enable searching
dataSource: skills,
fields: {
text: "skill",
groupBy: "category" // to enable grouoing
}
});
}
</script> |
|
|
|
col.Field("ShipName").HeaderText("ShipName").Width(150).Add();
col.Field("ShipCountry").HeaderText("ShipCountry").DataSource((IEnumerable<object>)ViewBag.dataSource1).Width(90).DropDownEditOptions(new DropDownListProperties() { DropDownListFields = { GroupBy = "Category", Text = "Skill", Value = "Skill" }, EnableFilterSearch = true}).EditType(EditingType.Dropdown).Add();
})
|
|
|