stacked column support in datatable
stacked column support in datatable
thegreencoder
Posts: 4Questions: 0Answers: 0
http://live.datatables.net/rufuzevo/1/edit
I want to know that is there any way to achieve stacked column in data table by means of CSS or inbuilt data table functionality
This discussion has been closed.
Replies
if stacked column achieved then what about other data table plugin support
Not quite sure what you mean I'm afraid. Could you show an example screenshot of what you are after?
Allan
My requirement is: I have a number of columns like 20 or so and I can't show them in a single row as they are having a large text value of them in the row. So to make it look better, I need to make columns in sandwich format like header will contain first 10 column then just below that next 10 column with 100% width, Similarly, a single data row contains data for first ten column and below that next ten column data (and that's too in single row).
After that, we need to make sorting searching and everything else working in data table along with export options.
Also, headers and data are creating dynamically using ajax call. So we can dynamically handle at what column sandwich look will happen like in image column at sandwich as 2 and 4.
I hope you are clear now with the problem.
This is something I am looking for and it's quite urgent as well. Allan Can you do respond a little bit quick.
you can try the link: http://live.datatables.net/rufuzevo/2/edit
My problem over here is I can't control the 100% width for first header row.
Actually, headers are still in one row but they are virtual made appear in the second row using CSS.
Please let me know if it is still misleading.
I'm afraid that this is not really something that is possible in DataTables. It treats every row as 100% independent. I'm not aware of a CSS hack that will do what you are looking for.
The best I can really suggest is that you use Responsive with immediately shown hidden details - like in this example.
Alternatively you might be able to use that idea as the basis for your own code that will use
row().child().show()
to show child rows with your own custom formatting.Allan
Hi Allan,
Based on your response I can say stacking is not possible in the data table as of now. Is there any CSS hack that you can recommend to do so. Show/hide immediate is not what I am looking.
Please let me know if you have any additional suggestions.
As I stated above:
Allan