How to set content in tabstrip via function

2 posts, 0 answers
  1. Barani
    Barani avatar
    3 posts
    Member since:
    Oct 2012

    Posted 23 Oct 2012 Link to this post

    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
  2. Barani
    Barani avatar
    3 posts
    Member since:
    Oct 2012

    Posted 26 Oct 2012 Link to this post

    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
  3. Kendo UI is VS 2017 Ready
Back to Top