jQuery UI Widgets Forums Navigation Tabs initTabContent – Passing Other Data

This topic contains 1 reply, has 1 voice, and was last updated by  JonH 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • initTabContent – Passing Other Data #50181

    JonH
    Participant

    Sorry if this is a double post, when I hit submit on the first attempt, it just seemed to disappear.

    I have a list of items displayed in a grid. No problem there.

    I’ve using “rowdetails” to display two sets of data (notes & audit) that relate to the items from the list.

    Using jqxTabs I’ve setup the rowdetails to show two tabs, one for Notes and one for Audit. (So far so good)

    I then use initTabContent and initWidgets (following the example) to display either the NoteGrid or AuditGrid. (Still good)

    However, the way I’ve setup my data sources I need to pass an ID to it so the proper data loads. This is where I’m having problems.

    The data I need is in the initrowdetails function (record.adm_num) but the initTabContent only allows the passing of the Tab number. Is there a way to also pass, or otherwise access) the record.adm_num data in the initTabContent function?

    Or do I need to readdress my data source?

    Thanks for your help.

    initTabContent – Passing Other Data #50186

    JonH
    Participant

    I had a flash of inspiration and found a way to make it work. Well, at least it works in my limited testing so far. 🙂

    I moved my datasource definitions out of the initnotedetails and initauditdetails functions so they are available outside of them. Then I added notesource.url = “load_notes.php?=”+record.adm_num, and a similar line for the auditsource, to the initrowdetails function.

    If there’s a better way, I’m open to learn.

    Thanks.

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

You must be logged in to reply to this topic.