jquery - JSON returned, but Kendo Grid does not display data -


I'm trying to create a grid hierarchy as shown here:.

My basic structure is a main grid that has been started with an HTML table which insists in detail, and produces a child grid. The child reads the grid from a controller method, which gives JSON. I have verified that the controller method is returning the correct, valid JSON, but the hair grid shows only column titles, without any data in the table's rows, the only exception I get is a JavaScript exception:

  UnkeyType error: Undefined no function   

Controlling method: Public JsonResult GetDBA (String DBaname, [DataSourceRequest] DataSourceRequest request) { Back Json (Repository. DBA. Where (M => M. Dinem == DBname). TODataSourceResult (Request)) ; Example: JSON returned:

  {"data": [{"DBAId": 25, "DBAName" : "Adam's HotDog Store", "Legal Entity": "Adam", "Business Phone": "1234567890", "Alternative Phone": blank, "Email Address": "test@email.com", "Address": blank , "Total": 1, "gross property": empty, "product list": blank, "selected product ideas": null}], "total": blank, "EIN": tap, "DBA": tap, "product" The table, which creates a data source for the main grid:   
  & lt; "errors": null}   

Table id = "grid" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th data-field = "dbname" & gt; DBA & lt; / Th & gt; // ... & lt; / Tr & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; @forchange (contract contract in appstats.demain.ints model) {& lt; Tr & gt; & Lt; TD & gt; @ Contract.DBA.DBAName & lt; / TD & gt; // ... & lt; / Tr & gt; } & Lt; / Tbody & gt; & Lt; / Table & gt;

Start the Kendo grid from the table defined above:

  & lt; Script & gt; $ {Document} .ready (function () {$ ("# grid"). KendoGrid ({sortable: true, data source: {schema: {model: {fields: {aging: {type: "number"}}}   

Bind the grid to the OnDatabase function: P> first ());} var grid = $ ("# grid")

  function data loss (e) {this.expandRow (this.tbody.find ("tr.k-master-row") The data ("Kendo Grid"); Grid. ("Databound", "OnDetabound");   

detailInit:

  FunctionInternet (E) {$ ("& lt; div / & gt;"). Edend to (e.detailcell) .cendo grid ({Datasource: {transport: {read: {dataType: "json", type: "POST", url: / region / "GetDBA", data: {"DBAName": e.data.DBAName}}}}, column : [{Field: "LegalEntity"}, {Field: "BusinessPhone"}, {Field: "Alternate Phone"}}}}}}}    

I got to work at the end, but I do not have any information so far Why my last function was n ot displayed data here is my last job:

  function statement (e) {$ .ajax ({type: "POST", url: "/ admin / GetDBA", data: {DBaname: e.data.DBana Me}} .Done (function (data) {$ ("& lt; ({Data: "BusinessPhone"}, {Field: "Alternate Phone", " }}}}}}}}    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -