jQuery UI Widgets › Forums › Grid › nested grid tab works once
This topic contains 2 replies, has 2 voices, and was last updated by Serdar 2 years ago.
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
Hello, I am using tab in nested grid.the first time I click on the tab tab, the event works.but it does not work on the second click.in other topics you wrote that tab is not an event but a callback operation.but when I click on tab, I want to pull the current current information from the database.can you suggest a solution?
var initrowdetails = function (index, parentElement, gridElement, rowdata) { var tabs = '<ul>' + '<li style="margin-left: 30px;">Actions</li>' + '<li>Persons</li>' + '</ul>' + '<div style="overflow: hidden;">' + '<div class="leftGrid"></div>' + '</div>' + '<div style="overflow: hidden;">' + '<div class="rightGrid"></div>' + '</div>' tabsdiv = $($(parentElement).children()[0]); $(tabsdiv).append(tabs); var GetPersons = function () { // ajax call function // grid.jqxGrid({ nested grid0 } var GetAddress = function () { // ajax call function // grid.jqxGrid({ nested grid1 } var initWidgets = function (tab) { switch (tab) { case 0: GetPersons(); break; case 1: GetAddress(); break; } } $(tabsdiv).jqxTabs({ width: "96.70%", height: "435px", initTabContent: initWidgets }); }Hi Serdar,
Both functions which you use in this code – initrowdetails and initTabContent are called just once when a row in the grid is expanded or a tab is clicked.
To get the selected tab, you can use:
$('#jqxTabs').on('selected', function (event) { var selectedTab = event.args.item; });Regards,
Peterthank you
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.