asp.net mvc - Not able to display the child grid when we click on the parent grid -


hi using kendo ui grid showing information on hierarchy model (parent child grid model) using mvc 4 . not able show child grid when click on arrow mark in parent grid ... uisng reference hierarchy grid model

and view kendo ui grid ...

@scripts.render("~/bundles/jquery") <script type="text/javascript">    </script>     @model ienumerable<topco.topmapp.mvc.models.costpagesearch> @{     viewbag.title = "index"; }     <h2>index</h2> @using (html.beginform()) {     @(html.kendo().grid<topco.topmapp.mvc.models.costpagesearch>()         .name("parentgrids")         .columns(columns =>         {             columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);             columns.bound(e => e.costpage).width(100);             columns.bound(e => e.description).width(100);             columns.bound(e => e.vendorname).width(100);             columns.bound(e => e.billtypedirect).width(100);             columns.bound(e => e.billtypewarehouse).width(100);             columns.bound(e => e.vendorname).width(100);          })         .sortable()         .pageable()         .scrollable()         .clientdetailtemplateid("template")         .htmlattributes(new { style = "height:430px;" })         .datasource(datasource => datasource             .ajax()             .pagesize(6)             .read(read => read.action("hierarchybinding_employees", "costpagedisplay"))         )         .events(events => events.databound("grid_databound")) )     <script id="template" type="text/kendo-tmpl">          @(html.kendo().grid<topco.topmapp.mvc.models.itemsdescriptionmodel>()             .name("grid_#=employeeid#")             .columns(columns =>             {                 columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);                 columns.bound(o => o.itemid).width(100);                 columns.bound(o => o.itemdescription).width(100);                 columns.bound(o => o.brandcode).width(100);                 columns.bound(o => o.packsize).width(100);             })            .datasource(datasource => datasource                .ajax()                .pagesize(5)                .read(read => read.action("hierarchybinding_orders", "costpagedisplay"))            )            .pageable()            .sortable()            .toclienttemplate()    )     </script> <script>     function grid_databound() {         this.expandrow(this.tbody.find("tr.k-master-row").first());         //alert('1');     } </script> 

and below image show

enter image description here

but getting image @ moment this

enter image description here

would 1 have idea why getting 1 , need change width of parent grid row .....pls suggest me ideas.... many thanks...

edit : new image getting first row (child grid) not able see row child grids...( using moving rows 1 grid grid checked rows need moved grid ...)

@using (html.beginform()) {     @(html.kendo().grid<topco.topmapp.mvc.models.costpagesearch>()         .name("parentgrids")         .columns(columns =>         {             columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);             columns.bound(e => e.costpage).width(100);             columns.bound(e => e.description).width(100);             columns.bound(e => e.vendorname).width(100);             columns.bound(e => e.billtypedirect).width(100);             columns.bound(e => e.billtypewarehouse).width(100);             columns.bound(e => e.vendorname).width(100);             })         .sortable()         .pageable()         .scrollable()         .clientdetailtemplateid("template")         .htmlattributes(new { style = "height:480px;" })         .datasource(datasource => datasource             .ajax()             .pagesize(6)             .read(read => read.action("hierarchybinding_employees", "costpagedisplay"))         )         .events(events => events.databound("databound")) )     <script id="template" type="text/kendo-tmpl">          @(html.kendo().grid<topco.topmapp.mvc.models.itemsdescriptionmodel>()             .name("grid_#=costpage#")             .columns(columns =>             {                 columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);                 columns.bound(o => o.itemid).width(100);                 columns.bound(o => o.itemdescription).width(100);                 columns.bound(o => o.brandcode).width(100);                 columns.bound(o => o.packsize).width(100);             })            .datasource(datasource => datasource                .ajax()                .pagesize(5)                .read(read => read.action("hierarchybinding_orders", "costpagedisplay"))            )            .pageable()            .sortable()            .toclienttemplate()    )     </script> <script>     function databound() {         this.expandrow(this.tbody.find("tr.k-master-row").first());         //alert('1');     } </script>             <input id="btnmove" type="button" value="move" />            @(html.kendo().grid<topco.topmapp.mvc.models.costpagesearch>()         .name("pargrids")                .columns(columns =>         {             columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);             columns.bound(e => e.costpage).width(70);             columns.bound(e => e.description).width(70);             columns.bound(e => e.vendorname).width(70);             columns.bound(e => e.billtypedirect).width(70);             columns.bound(e => e.billtypewarehouse).width(70);             columns.bound(e => e.ordertype).width(70);            })         .autobind(false);         .sortable()           .pageable()         .scrollable()                .clientdetailtemplateid("destinationtemplate")         .htmlattributes(new { style = "height:480px;" })         .datasource(datasource => datasource             .ajax()             .pagesize(5)             .read(read => read.action("hierarchybinding_employees", "costpagedisplay"))         )         .events(events => events.databound("databound")) )     <script id="destinationtemplate" type="text/kendo-tmpl">          @(html.kendo().grid<topco.topmapp.mvc.models.itemsdescriptionmodel>()             .name("grid_=employeeid")             .autobind(false);             .columns(columns =>             {                 columns.template(@<text></text>).clienttemplate("<input id='checkbox' onclick='grdchkboxclick(this); ' class='chkbxq' type='checkbox' />").width(30);                 columns.bound(o => o.itemid).width(70);                 columns.bound(o => o.itemdescription).width(70);                 columns.bound(o => o.brandcode).width(70);                 columns.bound(o => o.packsize).width(70);             })             .datasource(datasource => datasource                .ajax()                             .pagesize(6)                .read(read => read.action("hierarchybinding_orders", "costpagedisplay"))            )            .pageable()            .sortable()            .toclienttemplate()    )     </script> <script>     function databound() {         this.expandrow(this.tbody.find("tr.k-master-row").first());         //alert('1');     } </script>  } 

pls find attachments here .. code

enter image description here


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -