This is a migrated thread and some comments may be shown as answers.
Reload Ajax content
2 Answers 49 Views
This is a migrated thread and some comments may be shown as answers.
William Dunn
Top achievements
Rank 1
William Dunn asked on 02 Jul 2013, 02:59 PM
I have a panelbar in which the content is loaded via ajax.

I would like to reload the content based on the change event in a dropdown list.  However, it doesn't appear that I can do this.

I tried the reload() method on the panelbar object but it didn't do anything so I figured there was some caching involved.

Can I trigger a reload to occur?

Below is my client-side code and the panelbar.

thanks
var panelbar = $("#HomePanelBar").data("kendoPanelBar");
panelbar.reload();
 
 @(Html.Kendo().PanelBar()
        .Name("HomePanelBar")
        .HtmlAttributes(new { style = "width:400px;" })
        .ExpandMode(PanelBarExpandMode.Single)
        .Items(panelBar =>
        {
            panelBar.Add()
                .Text("Notification")
                .HtmlAttributes(new { id = "item1" })
                .Expanded(true)
                .LoadContentFrom("_Announcement", "Help");
        })
    )
 


2 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 04 Jul 2013, 12:11 PM
Hello,

The example in the documentation seems to be incorrect. The reload method accepts a selector for the items to be reloaded. In order to reload the panels you should use code similar to the one in the snippet:

var panelbar = $("#HomePanelBar").data("kendoPanelBar");
panelbar.reload("> .k-item");
We will update the documentation as soon as possible.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
William Dunn
Top achievements
Rank 1
answered on 08 Jul 2013, 11:31 AM
That did it.  Thank you very much!

Asked by
William Dunn
Top achievements
Rank 1
Answers by
Daniel
Telerik team
William Dunn
Top achievements
Rank 1
Share this question
or