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

Load different content based on selected id

1 Answer 154 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
REIMANN
Top achievements
Rank 1
REIMANN asked on 18 Feb 2014, 02:04 PM
Hello,

I use a panel bar to load content from a partial view which receives an id to display some informations based on it. Is it possible to reload a pane with different id using? I want something like this:

<script>
function loadDetails(id) {
      // get a reference to the panel bar
      var panelBar = $("#panelbar").data("kendoPanelBar");
      // reload the panel bar
      panelBar.reload("#paneWithAjax", new {id = id});
}
</script>

The panel bar has a pane  added with 
.LoadContentFrom("ShowDetails", "Controller", new {id = id})

Regards


1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 20 Feb 2014, 10:13 AM
Hello Reimann,

I am afraid that the reload method currently does not support passing additional parameters to the Ajax request. You could however, make the Ajax request manually and once the data is received, use it to populate the panel element. For example: 
//Change the first item's content
$("#panelbar .k-item:first .k-content").html("my ajax response goes here")


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