<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <div> <ej:Grid ID="FlatGrid" runat="server" AllowSorting="True" AllowPaging="True"> <ClientSideEvents ActionComplete="complete" /> <Columns> <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" /> . . . . .. . </Columns> <EditSettings AllowEditing="True" EditMode="dialogtemplate" DialogEditorTemplateID="#template"></EditSettings> </ej:Grid> </div> <script type="text/javascript">
function complete(args) { . . . .. . if (args.requestType == "beginedit") { $("#OrderID").attr("disabled", "disabled"); $("#ShipCity").ejDropDownList({ width: '116px', change: "_Change" }).ejDropDownList("setSelectedValue", args.row.children().eq(5).text()); } else $("#ShipCity").ejDropDownList({ width: '116px', change: "_Change" }); } }
function _Change(args) { . . . . . } </script> |