- Home
- Forum
- ASP.NET Web Forms
- Editing grid data in template, using ejDropDownList - setting onChange and setSelectedValue
Editing grid data in template, using ejDropDownList - setting onChange and setSelectedValue
Attachment: Grid_705a087c.zip
The cause of the problem is that you have given onChange property for ejDropDownList in the provided code example and sample. But there is no such property available with the ejDropDownList. Refer to the following screenshot of your code.
We suspect that you are looking for the change event of the ejDropDownList. Please refer to the below code example for the change event of Grid.
| <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> |
Please refer to the following Help Documents for different events of ejGrid and ejDropDownList.
https://help.syncfusion.com/api/js/ejgrid#events
https://help.syncfusion.com/api/js/ejdropdownlist#events
We have also modified your sample that can be downloaded from the following location.
Sample: https://www.syncfusion.com/downloads/support/forum/121553/ze/Grid_705a087c551748582
Regards,
Seeni Sakthi Kumar S.
We are happy to hear that your issue has been resolved.
Get back to us if you need further assistance.
Regards,
Seeni Sakthi Kumar S.
- 3 Replies
- 2 Participants
-
BS Bruce Stevenson
- Dec 29, 2015 05:11 PM UTC
- Dec 31, 2015 04:23 AM UTC