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

ListView Paging inside a PanelBar

1 Answer 179 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Yeti
Top achievements
Rank 1
Yeti asked on 04 Sep 2012, 12:42 AM
Hi,

Using MVC 4 and Kendo UI Q2.

I have a PanelBar with a Listview in one of the panels, loaded from a PartialView. This works great.

However, when I add paging to the listview then the panel collapses each time I go to a new page. Happens in both Single and Multiple expand mode. So if thought I could subscribe to a NextPage event and do something to prevent this, but I cannot figure out how to get the paging event.


PanelBar    .vbhtml
@(Html.Kendo().PanelBar() _
    .Name("zone-panelbar") _
    .ExpandMode(PanelBarExpandMode.Single) _
    .Items( _
        Sub(panelbar)
                panelbar.Add().Text("Current Playlist") _
                    .LoadContentFrom("Get", "Playlist", New With {.id = currentZone.Id}) _
                    .Selected(True)
                panelbar.Add().Text("Other") _
                    .Content("<h2>Other</h2>")
        End Sub))


_Playlist.vbhtml
<script type="text/x-kendo-tmpl" id="template-playlist">
    <div class="playlist-panel-song">
${Artist} - ${Title}
    </div>
</script>

@(Html.Kendo.ListView(Of Player.Data.Song) _
    .Name("listview-playlist") _
    .ClientTemplateId("template-playlist") _
    .TagName("div") _
    .Pageable(
        Sub(pager)
                pager.Enabled(True)
                pager.Info(False)
                pager.Input(False)
                pager.Numeric(False)
                pager.PageSizes(False)
                pager.PreviousNext(False)
                pager.Refresh(False)
        End Sub) _
    .DataSource(
        Sub(dataSource)
                dataSource.Read("Read", "Playlist", New With {.id = Model.Id})
                dataSource.PageSize(9)
        End Sub)
)


Any help/advise/suggestions would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 07 Sep 2012, 06:56 AM
Hello Martin,

We have confirmed this to be a bug in the PanelBar implementation. The bug fix will be available in the service pack. As a work-around, you can stop the collapsing by preventing the panelbar collapse event when the pager is clicked.

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Yeti
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or