Lista de KendoVer plantilla detallada

Hi does kendo listiview support detail template or not like kendo Grid. If not how i can implemented detail template with kendo listview.

saludos

preguntado el 05 de mayo de 13 a las 15:05

2 Respuestas

ListView does not support detail template.

Better take a look how plantillas are working and inside of main template put an element which you can find when the datos vinculados event occurs and again turn into template.

contestado el 05 de mayo de 13 a las 18:05

The Kendo Ui Listview does not support details template but it can be done the same user

interface customizing the kendo Gridview details template.

Here the simple code:

<div id="listView"></div>

<script type="text/x-kendo-template" id="template">
    <div style="height:150px;width:30%;float:left;background-color:gray">
    </div>
    <div style="width:65%;float:left" class="customGrid"></div>
</script>

this.List = $("#listView").kendoGrid({
                dataSource: [{ Id: 1, Name: 'A' }, { Id: 2, Name: 'B' }, { Id: 3, Name: 'C' }, { Id: 4, Name: 'D' }],                
                detailTemplate: kendo.template($("#template").html()),
                detailInit: detailInit,
                scrollable:false
            }).data('kendoGrid');
            var selectTr;
            function detailInit(e) {
                alert(e.data.Id);
                var detailRow = e.detailRow;

                var gg = detailRow.find(".customGrid").kendoGrid({
                    dataSource: [{ Id: 1, Name: 'A' }, { Id: 2, Name: 'B' }, { Id: 3, Name: 'C' }, { Id: 4, Name: 'D' }],
                    scrollable: false,
                    selectable: 'row',
                    change: function () {
                        selectTr = this.select();
                        console.log(selectTr.closest('.customGrid').data('grid').dataItem(selectTr));

                    }

                }).data('kendoGrid');
                detailRow.find(".customGrid").data('grid', gg);
            }

Respondido el 08 de enero de 15 a las 18:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.