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

How to set content in tabstrip via function

1 Answer 213 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Barani
Top achievements
Rank 1
Barani asked on 24 Oct 2012, 02:09 AM
Hi,

I am relatively new to kendo UI, sorry if this is a very basic question..

I am using kendo data grid to get the data from a json webservice using AJAX call.

I have created a template which will open a tabstrip when the name field is clicked in data grid..

columns: [{
    field: "Name",
    title: "Name",
    width: 100,
    template:"<span onclick='tabStrip.append([{text: \"#=Name#  <a href onclick=DeleteTabs(this);>x</a> \",encoded: false,content:\"#=Name#\" }]);'>#= Name#</span>"
    //template: "<span onclick='tabStrip.append([{text: \"#= Name#\", contentUrl: \"/apps/dataelement?uid=#= Uid#\"}]);'>#= Name#</span>"
},

When I click the name value in data grid it opens a new tab strip and populates a default content.

Now I have another function which gets the UID as input and returns back the detail corresponding to a particular name in data grid, I am trying to populate the result from that function inside this tab but I am not sure on how to do that... Can someone please help....

Thanks,
BB

1 Answer, 1 is accepted

Sort by
0
Barani
Top achievements
Rank 1
answered on 26 Oct 2012, 06:09 PM
Hi,

I figured out that we can use function directly in content parameter or call a method on click of the template which will inturn create a tabstrip and call content fucntion.

something like below,

tabStrip.append([{text: \"#=Name#\",content:getDetail()}])

Thanks,
Barani
Tags
TabStrip
Asked by
Barani
Top achievements
Rank 1
Answers by
Barani
Top achievements
Rank 1
Share this question
or