Hi Paul,
Thanks for using Syncfusion products.
Based on your requirement we have created a sample to render the grid by using array data. The sample can be downloaded from following location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/118758/TestGrid-1406488504.zip
For your kind information, we need to use the dot(“.”) symbol in field If we want to render the array of data. Please refer the following code snippet.
<ej:Grid ID="Grid" runat="server"> <Columns> <ej:Column Field="ID" HeaderText="ID" IsPrimaryKey="true" Visible="false" > </ej:Column> <ej:Column Field="FirstName" HeaderText="First Name" > </ej:Column> <ej:Column Field="LastName" HeaderText="Last Name" > </ej:Column> < ej:Column Field="Addresses.0.Address1" HeaderText="Address" > </ej:Column> </Columns> <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings> <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings> </ej:Grid> |
Please try the above sample and get back to us if you need any further assistance.
Regards,
Sellappandi R
<ej:Grid ID="gridDistributors" runat="server" AllowPaging="True" OnServerEditRow="gridEditEvents_ServerEditRow" OnServerAddRow="gridEditEvents_ServerAddRow" OnServerDeleteRow="gridEditEvents_ServerDeleteRow" OnDataBinding="gridDistributors_DataBinding"> <ClientSideEvents ActionComplete="complete" EndAdd="endAdd" EndDelete="endDelete" EndEdit="endEdit" /> <Columns> <ej:Column Field="DistributorID" Visible="false" HeaderText="DistributorID" IsPrimaryKey="true"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="DistributorName" HeaderText="Distributor Name"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="DistributorContact" HeaderText="Contact"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="PhoneNumber" HeaderText="Phone Number"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="EmailAddress" HeaderText="Email Address"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.AddressID" HeaderText="AddressID" Visible="false"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.Address1" HeaderText="Address 1"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.Address2" HeaderText="Address 2"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.City" HeaderText="City"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.State" HeaderText="State"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.Country.CountryID" HeaderText="CountryID" Visible="false"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.Country.CountryDescription" HeaderText="Country" EditType="Dropdown"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="Addresses.0.ZipCode" HeaderText="ZipCode"> <NumericEditOptions Tag="" /> </ej:Column> <ej:Column Field="IsActive" HeaderText="Active Distributor" EditType="Boolean"> <NumericEditOptions Tag="" /> </ej:Column> </Columns> <PageSettings Template="" /> <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="true" EditMode="Dialog" AllowEditOnDblClick="true"></EditSettings> <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete"></ToolbarSettings> <ContextmenuSettings EnableContextmenu="true"></ContextmenuSettings> </ej:Grid> <script type="text/javascript"> function complete(args) { if (args.requestType == "beginedit") { var currentRow = args.model.currentViewData[args.rowIndex]; $("#gridDistributors_dialogEdit").ejDialog({ title: "Details of " + currentRow.DistributorName }); } } </script>
<script src="/Scripts/jquery-1.10.2.min.js"></script> <script src="/Scripts/jquery.easing.1.3.min.js"></script> <script src="/Scripts/jquery.globalize.min.js"></script> <script src="/Scripts/jsrender.min.js"></script> <script src="/Scripts/ej.web.all.min.js"></script> <script src="/Scripts/ej.webform.min.js"></script> <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
Hi Paul,
Thanks for the update.
We have analyzed your reported issue and found that you have created an incident “#137742” and also the forum “#118783” for the same query “Editing is not working while using Edit type as dropdown” . So please refer the incident “#137742” for better follow up.
Please let us know if you have any queries.
Regards,
Sellappandi R