Group row to left

Group row to left

gb8gb8 Posts: 3Questions: 1Answers: 0

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

  • colincolin Posts: 15,236Questions: 1Answers: 2,598

    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

  • gb8gb8 Posts: 3Questions: 1Answers: 0

    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).

  • colincolin Posts: 15,236Questions: 1Answers: 2,598

    Hi @gb8 ,

    You could do something like this, using drawCallback,

    Cheers,

    Colin

  • gb8gb8 Posts: 3Questions: 1Answers: 0

    Awesome. Thank you!!

This discussion has been closed.