<ej:DropDownList ID="ddlDept" runat="server" ClientSideOnBeforePopupShown="onshown" ClientSideOnDataBound="ondata">
</ej:DropDownList>
<script>
var count = 0;
function ondata() {
count = 0;
}
function onshown() {
if (this.model.dataSource != null && count == 0) {
this.model.dataSource.splice(0, 0, { ShipName: "All", OrderID: 0 });
var b = this.model.dataSource;
this.model.dataSource = null;
this.option("dataSource", b);
}
count++;
}
</script> |