Group row to left
Group row to left
![gb8](https://secure.gravatar.com/avatar/70d296685d97f238d7d43c3b1bf078c8/?default=https%3A%2F%2Fvanillicon.com%2F70d296685d97f238d7d43c3b1bf078c8_200.png&rating=g&size=120)
Hi all,
Is it possible to group a column to the left, rather than above?
Example image is below. We'd like to group by state
Thank you!
This discussion has been closed.
Hi all,
Is it possible to group a column to the left, rather than above?
Example image is below. We'd like to group by state
Thank you!
Answers
Hi @gb8 ,
Are you sure you're using DataTables there? If you want to combine the two, it would be best to use a single column, and merge the two columns (State & City) with
columns.render
.We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Thanks Colin.
Here's a JS Fiddle of what I'm referring to. https://jsfiddle.net/166oc16s/4/
I'm not sure if a single column would work, as I still want the user to be able to filter/sort by state and city separately.
I'm trying to make it so that the result looks like the image below.
Instead of grouping Florida as a top row, I want it just to appear in the first row and not the subsequent 2 (similar to merging 3 rows in excel).
Hi @gb8 ,
You could do something like this, using
drawCallback
,Cheers,
Colin
Awesome. Thank you!!