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

listview data in the parent-child relation format

3 Answers 170 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Vadivel
Top achievements
Rank 1
Vadivel asked on 10 Sep 2015, 02:35 PM
We have a scenario, where we have to show the listview data in the parent-child relation format. In the Parent row there should be a plus (+) symbol and on click of the plus symbol the child data should be opened. It’s basically group the data under the parent and show the child data on click of the plus symbol.

Kindly suggest us the approach or the code to accomplish our requirement.

Below sample code of my template for the listview without the parent-child relation and will have to modify the code to accommodate the new requirement.


<script type="text/x-kendo-tmpl" id="template">
        <div class="left-body-container">
            <table id="doc-list" class="doc-list" width="100%">
                <tbody>                   
                    # if (FolderName==null) { #
                    <tr id="tblRowFileItems" objectid="#:ObjectId#">
                        <td>
                            <listleft>
                                <img src="#:ImagePath#" />

                                <file-folder-names>
                                    <a data-role="button" href="GetDocumentContent?objId=#:ObjectId#" target="_blank" id="testa">#:DocumentName#</a>
                                </file-folder-names>
                                <br />

                                <span class="details">
                                    #:DocumentSize# <span class="paddingLR10">|</span> #:DocumentCreatedDate# :
                                    # if (!(DocumentCreatedby==null)) { # <a href=""> #:DocumentCreatedby# </a> # } #
                                </span>

                            </listleft>
                        </td>
                    </tr>
                    # } #
                </tbody>
            </table>
        </div>
    </script>

@(Html.Kendo().ListView<IndexModels>(Model)
                        .Name("listView")
                        .TagName("div")
                        .ClientTemplateId("template")
                        .DataSource(dataSource =>
                        {
                            dataSource.Read(read => read.Action("ReadDataonPaging", "Home").Data("additionalInfo").Type(HttpVerbs.Post));
                            dataSource.ServerOperation(true);
                            dataSource.PageSize(10);


                        })

                .Pageable(pager => pager

                                 .PreviousNext(true)
                         )
                )

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 12 Sep 2015, 08:11 AM

Hello Vadivel,

 

I am afraid that we do not have an example that suits your exact requirements. However if you have any specific questions regarding the built-in Kendo UI functionality, do not hesitate to contact us.

 

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Kumar
Top achievements
Rank 1
answered on 14 Sep 2015, 09:40 AM

Hi Kiril,

So you mean the nested list view for two different data source is not possible?

 

Regards

Utkarsh

0
Alexander Valchev
Telerik team
answered on 16 Sep 2015, 07:10 AM
Hi Kumar,

Yes your understanding is correct. The functionality is not supported out of the box by the Kendo Web ListView widget.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ListView
Asked by
Vadivel
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Kumar
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or