This is a migrated thread and some comments may be shown as answers.

Hierarchy - Is it possible to have 2 tabs on hierarchy each refering to a separate table?

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meera
Top achievements
Rank 1
Meera asked on 25 Feb 2013, 05:32 PM
Hi Experts, 
  Can we display two sets of hierarchy on the same level on a tab strip? Something like  Employee(Main Table)  with Orders received (Hierarchy table 1)  and  orders fullfilled (Hierarchy table 2)?



  

1 Answer, 1 is accepted

Sort by
0
Meera
Top achievements
Rank 1
answered on 25 Feb 2013, 06:03 PM
Nevermind, I could accomplish it  using detail template

<script id="modelsTemplate" type="text/kendo-tmpl">
     @(Html.Kendo().TabStrip()
            .Name("TabStrip_#=modelId#")
            .SelectedIndex(0)
            .Items(items =>
            {
                items.Add().Text("Model Data Requirements").Content(@<text>
    @(Html.Kendo().Grid<VModelDataReqGet>()
            .Name("DataReq_#=modelId#")
            .Columns(columns =>
            {
                columns.Bound(o => o.DataCategoryCode).Width(101);
                columns.Bound(o => o.DataSubcategoryCode).Width(200);
                columns.Bound(o => o.Value).Width(140);
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("HierarchyBinding_ModelDataReqs", "ModelSelection", new { modelId = "#=modelId#" }))
                .PageSize(5)
            )
              .Pageable()
         //   .Sortable()    
            .ToClientTemplate()

    )
     </text>                        
                );
                items.Add().Text("Study Information").Content(@<text>

                 @(Html.Kendo().Grid<StudyDisplay>()
            .Name("study_#=modelId#")
            .Columns(columns =>
            {
                columns.Bound(o => o.studyId).Width(101);
                columns.Bound(o => o.studyName).Width(200);
               
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("HierarchyBinding_ModelStudys", "ModelSelection", new { modelId = "#=modelId#" }))
                .PageSize(5)
            )
              .Pageable()
         //   .Sortable()    
            .ToClientTemplate()

    )



                
     </text>                        
                );
                })
            .ToClientTemplate())
                               
</script>
Tags
Grid
Asked by
Meera
Top achievements
Rank 1
Answers by
Meera
Top achievements
Rank 1
Share this question
or