jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Tab Contents refresh

This topic contains 4 replies, has 2 voices, and was last updated by  DavidSimmons 12 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Tab Contents refresh #12877

    DavidSimmons
    Participant

    Is there a way to refresh a Tab’s content (what ever is in the tab) on Tab Click or Select….

    Tab Contents refresh #12879

    DavidSimmons
    Participant

    Sorry I thought this might make it clearer. I have a jqxGrid in each of the Tabs, so if I could get the jqxgrid instance name on a tab click then I could do something like this….

    $(‘#jqxTabs’).bind(‘tabclick’, function (event) {
    displayEvent(event);
    var jqxgridName = **** Tab’s Content Div Name or instance name *****

    $(jqxgridName).jqxGrid(‘updatebounddata’);

    });

    New Bid
    Bid Prep
    Review
    Complete
    JFU

    Tab Contents refresh #13043

    DavidSimmons
    Participant

    In the following example, when you click on the tab, I need to perform a $(jqxgridName).jqxGrid(‘updatebounddata’); for the clicked tab’s content or jqxgrid. I think if I could get the tab’s content div id name back on a tab click event I could do this but not sure how.

    I would appreciate any help?

    Bids

    New Bid
    Bid Prep
    Review
    Complete
    JFU

    Tab Contents refresh #13047

    Peter Stoev
    Keymaster

    Hi David,

    When you add the HTML of the jqxTabs, you can set IDs of the jqxTabs DIV tags, like id=”tabContent1″, id=”tabContent2″, etc. Then subscribe to the ‘tabclick’ event and get the tab’s index in the event handler:

    $('#jqxTabs').on('tabclick', function (event) { var clickedItem = event.args.item; }); 

    To get the tab’s content, use a simple jQuery selection:

    var content = $(“#tabContent” + clickedItem);

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Tab Contents refresh #13072

    DavidSimmons
    Participant

    Not sure I understand your example… Here is my workaround, but I would rather get the content -> div -> id -> names dynamically. Are we talking about the same thing?

    $(“#jqxTabs”).on(“tabclick”, function (event) {
    var item = event.args.item;
    var title = $(“#jqxTabs”).jqxTabs(“getTitleAt”, item);
    if(title===”New Bid”){
    $(“#jqxgridNew”).jqxGrid(‘updatebounddata’);
    }else if(title===”Bid Prep”){
    $(“#jqxgridPrep”).jqxGrid(‘updatebounddata’);
    }else if(title===”Review”){
    $(“#jqxgridReview”).jqxGrid(‘updatebounddata’);
    }else if(title===”Complete”){
    $(“#jqxgridComplete”).jqxGrid(‘updatebounddata’);
    }else if(title===”JFU”){
    $(“#jqxgridJFU”).jqxGrid(‘updatebounddata’);
    }
    });

    New Bid
    Bid Prep
    Review
    Complete
    JFU

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.