<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True">
<ClientSideEvents ActionBegin="begin"/>
.....
</ej:Grid>
<script type="text/javascript">
function begin(args) {
if (args.requestType == "save") {
args.cancel = true;
// your own code here
}
}
</script> |
<ej:DropDownList ID="dropdown" runat="server" ClientSideOnChange="selectChange" Width="120px">
.....
</ej:DropDownList>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True">
<ClientSideEvents RowSelected="rowSelected"/>
....
</ej:Grid>
<script type="text/javascript">
function rowSelected(args) {
var obj = $("#<%=dropdown.ClientID%>").data("ejDropDownList");
$("#<%=dropdown.ClientID%>").ejDropDownList("model.selectedIndex", this.selectedRowsIndexes[0])
}
</script>
|
<ej:Dialog ID="dialog" runat="server">
<DialogContent>
<div class="col-md-3">
<ej:DropDownList ID="dropdown" Width="200px" DataTextField="Text" DataValueField="ID" runat="server">
</ej:DropDownList>
</div>
</DialogContent>
</ej:Dialog>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True">
<ClientSideEvents RowSelected="rowSelected"/>
…..
</ej:Grid>
<script type="text/javascript">
function rowSelected(args) {
var obj = $("#<%=dropdown.ClientID%>").data("ejDropDownList");
$("#<%=dropdown.ClientID%>").ejDropDownList("model.selectedIndex", this.selectedRowsIndexes[0])
}
</script> |
<ej:Dialog ID="dialog" runat="server">
<DialogContent>
<div class="col-md-3">
<ej:DropDownList ID="dropdown" runat="server" Width="120px">
<Items>
<ej:DropDownListItem Text="1" Value="1" />
<ej:DropDownListItem Text="2" Value="2" />
....
</Items>
</ej:DropDownList>
</div>
</DialogContent>
</ej:Dialog>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True">
<ClientSideEvents RowSelected="rowSelected"/>
</ej:Grid>
<script type="text/javascript">
function rowSelected(args) {
var obj = $("#<%=dropdown.ClientID%>").data("ejDropDownList");
$("#<%=dropdown.ClientID%>").ejDropDownList("model.selectedIndex", this.selectedRowsIndexes[0])
}
</script> |