jquery - Is it possible to set the nested grid of a parent grid in a variable with Kendo UI? -


I have two grids, which are embedded in the other basically, the sample I worked with looks like :

  $ (document) .ready (function () {var elementMasterInfo = $ ("# gridMasterInfo") .cendo grid ({dataSource: {type: "odata", transport: {read : "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Employees"}, pagesizeo: 6,}, height: 430, description: detailInit, column: [... column here. .}});}); Function Description Details (E) {$ ("& lt; div / & gt;") Endend (e.te.tclcl). Kendo grid ({Data source: data source, column: [column here ...]}}}   

And it works fine I was wondering how I first I can set the embedded grid in a variable and then add that these functions in detail ... in this way (which does not work):

  var InnerGrid = $ ("# ("DataInternet: Datasource, Columns: [Columns here ...]} '; Function Description (E) {$ (" & lt; div / & gt; "). Added to ( e.detailcell). werner grid;}   

Since I can not do this work, my time is appreciated!

As the answer to the comment has been proposed, I am proving it as such with some additional information.

A nested grid is designed for each line of the original grid, Can not use the constant identifier as the proposed ( #divInnerTasks ) in the form of identities For placeholders.

does depend on dataSource Basic foot addition, details. The idea is that the data in the internal grid is variable and there are changes for each original line. Examples: Parents are grid invoices and internal grids, the details of the quantity, value and price of each product.

But there is no other grid for the details, you can only show some columns as basic data and then use the rest of the information as a description.

Example: Your contacts in the grid include the first and last names in the parent line, you show the phone and the e-mail address () in details.

  var grid = $ ("# grid"). Kendo Grid ({Data Source: DS, Editable: Wrong, Page Lol: True, Extension In Function (E) {//} This is not really the best way to show data which is part of // original line, it just For example, var template = kendo.template ($ ("# template"). Html ()) (e.data); e.detailRow.html (template);}, column: [[field: "first name" , "Width: 200, title:" last name "}, {field:" city ", width: 200}]}), width: 90, title:" first name "}, {field:" last name ", width: 200) Data ("candrog");    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -