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

Reload Tab - Javascript

1 Answer 451 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Joao
Top achievements
Rank 1
Joao asked on 04 Aug 2015, 05:09 PM

Hi,

I have the following Tabstrip, that loads a partial view:

 <div id="tabs">
    @(Html.Kendo().TabStrip()
                        .Name("tabstrip")
                        .Items(tabstrip =>
                        {
                            tabstrip.Add().Text("Main").LoadContentFrom("AircraftMainTab", "Aircraft", new { id = 2 })
                            .Selected(true);
                        })
    )
</div>

I'm passing a value to filter the data the partial view gets.

Now I would like to reload this TAB, because the ID I pass is base on a selected Grid Row.

I can get the ID from the GRID, but don't know how to reload the partial view and pass the value from javascript.

<script type="text/javascript">
    function onChange(arg) {
        var model = this.dataItem(this.select());

        var ts = $(tabstrip).data().kendoTabStrip;

        ts.reload($(this));
    }
</script>

 

Thanks

JP

 

 

 ​

 

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 06 Aug 2015, 09:00 AM
Hi Joao,

Providing additional parameters while reloading tabs is not supported out of the box. You could however, manually update the contentUrl before reloading the tab, as shown in this proof of concept example.

Regards,
Alexander Popov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TabStrip
Asked by
Joao
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or