i am making grid using jqgrid
i want to create tabs in my application Clicking on a tab should open a grid and the name of the tab should appear on top of the page and when i click on another tab it should load the other grid.. the grids should be loaded on the same page and the tabs should also appear all the time on the page i have already created the grids just want to integrate them with the tabs... plzz help me thanks in advance.....
Piyush,
Great answer but there's a slight problem in your code that is not compatible with the latest version of jquery UI. If you are using jqueryUI 1.10.x and above, you will have to use the "active" optionName instead of "selected", per this change: http://jqueryui.com/upgrade-guide/1.10/#removed-selected-option-use-active
Also the event model has changed as well. I updated the code below and tested it and it works fine in jQuery UI 1.10.3:
Okay following will be the code for you. I'm using same data for both(emp, manager) the tabs you can change it later.
HTML
JavaScript
So, here my by default selected tab will be emp and its index will be 0, so I'm checking for it initially and then on tabselect event, I'm checking for index again. For emp index is 0 and manager index is 1. based on that I'm changing the grid and pager value, you can change your data here. This will work for you. I dont know much about ui tabs I'll study for it further. But for now this will work for you.