jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Multiple tabs in a grid possible?
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid
This topic contains 6 replies, has 2 voices, and was last updated by Hristo 6 years, 10 months ago.
-
Author
-
Can you tell me if I can have multiple tabs in a jqxgrid? For example, one tab will populate records from one webservice, another tab will populate records from different webservice etc so that when I click on a particular tab, this can be populated based on the specific web service call.
One more question, would the multiple tabse require multiple webservices or can I have one single java webservice returning JSON response for all the tabs? Thanks
Hello walker1234,
There is no reason to cannot load different data for different jqxGrids (via separated DataAdapter for each one).
You should choose the most suitable option for you and your project – to get data from multiples webservices or from one.
As you mentioned Java I would like to suggest you look at this tutorial, it could be helpful.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comThanks Histro. I have few more questions:
1) So, you mean to say that I can’t have something like this (https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxtabs/jquery-tabs-getting-started.htm?search=) ?
2) Also, when I click on any tab (say for example, I have 4 TABS), is it like I need to maintain same number of columns for each of the tabs or can they be different in numbers?
By Java, I mean, it’s a RESTFul web service, using Spring. I am not using JSP. Basically, when I make an Ajax call, I get a JSON response and I use that to display data in the jQXGrid. Not sure if I would be using jQXGrid in my case
Hello walker1234,
I mean that is possible. We do not have such an example to demonstrate.
Could you clarify what you mean by “same number of columns”? If you have 4 tabs (ul with 4<li>
tags) you should have 4<div>
tags next to the<ul>
tag.
You should care to have such structure to work jqxTabs properly.I would like to suggest you look at this tutorial:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/java-integration/bind-jquery-grid-to-mysql-database-using-spring-mvc.htm?search=
It is about the Spring MVC to bind jqxGrid which could be useful. You could use the approach for your purpose.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comSure please find more clarifications for “same number of columns“. Say for example, I have the 5 tabs as shown in the screenshot below.
Instead of printing Content1, say for example, I have the following jQXGrid with 4 columns as shown in the screenshot below.
Suppose, if I want to click on Tab 2 and have similar jQXgrid but with different number of columns (maybe 2 or 7 etc). Similarly, if I could have different number of columns when I click on other tabs as well? So, this was my questions. Please let me know if more clarifications are needed.
Thanks
Hello walker1234,
Thank you for the clarification. Now I got your point of view.
You should update the jqxGrid with itscolumns
property depends on the concrete case set specific columns.
If you have absolutely the same columns you could jut show/hide them depends on the case.
Also, if you have a different data source for them you should useupdatebounddata
method of the jqxGrid.
About the different HTTP requests, I think the tutorial below will be helpful. Please, take a look at this:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-extra-http-variables.htm?search=gridI would like to propose your attention on
source.data
andformatData
function of the DataAdapter.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.