ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Column headers can span over multiple columns enabling a hierarchical structure

Open wolf1860 opened this issue 12 years ago • 20 comments

I want to display hierarchical column headers by the property "headerRowTemplate",but I don't know how can I do this, thanks a lot!

wolf1860 avatar Feb 02 '14 16:02 wolf1860

Please upvote issue #644

akommareddi avatar Feb 03 '14 22:02 akommareddi

This is a feature we want in 3.0.

roblarsen avatar Apr 24 '14 16:04 roblarsen

is this feature available on "ui-grid - v3.0.0-rc.20-8199eb5 - 2015-04-13" ? if so please provide us step by step guide?

nmeeda avatar Apr 15 '15 15:04 nmeeda

No, this enhancement request is still open

PaulL1 avatar Apr 15 '15 17:04 PaulL1

we need this feature #644

vvardhanz avatar Jul 31 '15 16:07 vvardhanz

+1. We need to show how multiple columns are related to each other by having another row in the header that we can 'span' across columns with a label we specify as pretty much like what was proposed in ticket #644

anilnatha avatar Aug 20 '15 22:08 anilnatha

We need this too, thanks!

AdamDiament avatar Nov 11 '15 14:11 AdamDiament

I've been working on something in this plunker. Your results may vary... What would I need to do to make this ready for inclusion with ui-grid? http://plnkr.co/edit/rUsK0LfGF3ws8vhsc9sR?p=preview

jmsunseri avatar Nov 14 '15 23:11 jmsunseri

Very nice jmsunseri, but unfortunately doesn't fit RTL.

MadUser avatar Dec 30 '15 10:12 MadUser

Feel free to implement RTL support and send back your changes On Dec 30, 2015 4:01 AM, "MadUser" [email protected] wrote:

Very nice jmsunseri, but unfortunately doesn't fit RTL.

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ui-grid/issues/963#issuecomment-167971426.

jmsunseri avatar Dec 30 '15 10:12 jmsunseri

well, it seems to me that there is a bug in ui-grid css file. in the code below I omitted the first line(which make all the mess) and it looks much better, I am not sure if it is needed in other scenarios but I couldn't find one: /.ui-grid[dir=rtl] .ui-grid-header-cell,/ .ui-grid[dir=rtl] .ui-grid-footer-cell, .ui-grid[dir=rtl] .ui-grid-cell { float: right !important; } UPDATE: this will screw the menu popup. I will come back with more accurate answer...

the other thing is missing in your category object is description property (for text other then English) then I use this description in the template instead of the name. now it looks fine. there is some padding issues but that's minor. thanks :)

MadUser avatar Dec 30 '15 14:12 MadUser

Please add this feature as early as possible. Also, please help me out with multi-level column grouping.

animals | birds

mammals | reptiles | flying | flightless | galliformes

tiger | man | snake | lizard | sparrow | parrot | penguin | hen | goose | peacock

hchinthapally avatar Jul 14 '16 04:07 hchinthapally

+1

cmartins88 avatar Jul 21 '16 11:07 cmartins88

Thank you for this information! I am moving this to our new support page as it is not an actual issue with UI-Grid, but a request. Someone from the Dev team should reply to your request there. https://groups.google.com/forum/#!topic/ui-grid-support/oh3HVqpNI6w

Regards,

Marcelo

mportuga avatar Aug 14 '16 23:08 mportuga

was this ever implemented ?? I need this !

29er avatar Jan 11 '17 00:01 29er

look at this: http://stackoverflow.com/questions/31847615/header-grouping-of-ui-grid-angular/39740803#39740803

uncledb avatar Jan 11 '17 08:01 uncledb

I hope that this can be what you want. https://jsfiddle.net/jrkim123/wexmj2Lw/

jrkim123us avatar Feb 16 '17 04:02 jrkim123us

Is there some work going on related to this? Plans, or discussions about the way to go?

I'ld want something reusable, localizable, not bound to a scope, working with other modules, and, most importantly, built-in to the library! If nothing's currently going on this way, i'll start working on a pull request.

I think this feature is a must.

JSlain avatar Aug 01 '17 02:08 JSlain

@jrkim123us that is badass! Nice work...but it shouldn't take this much code/markup to do something this simple.

WorkMAE avatar Jul 30 '18 20:07 WorkMAE

@jrkim123us I cannot get this working in my setup. I am loading a grid in a uib-modal and it loads everything fine up to <tr ng-repeat="pos in modalQSGridOptions.headerAppends.index">

where it just shows and nothing after it as if it cannot find the $scope object in the modal controller.

in the modal controller:

$scope.modalQSGridOptions = {
                    enableSorting: true,
                    enableGridMenu: true,
                    enableFiltering: true,
                    enableColumnResizing: true,
                    onRegisterApi: function (gridApi) {
                        $scope.gridOpenApi = gridApi;
                    },
                    headerTemplate: 'QSHeader.html',
                    headerAppends: {
                        index: [0, 1],
                        height: 35
                    },
                    columnDefs: colDefsQualScore,
                    data: qualityScoreData
}

What I get is the data loading fine without any headers. Any idea why this is happening? I modified your version on the QSFiddle to use the $scope object and it works fine by removing the controller as syntax and replacing this.options with $scope, but I can't get it working in my example at all.

I keep getting an angular.js:13236 Error: [$interpolate:interr] http://errors.angularjs.org/1.5.0/$interpolate/interr?p0=%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%7Bgrid%7D%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20&p1=TypeError%3A%20Converting%20circular%20structure%20to%20JSON

Any help?

UPDATE:

OK I found out that for this to work it MUST be called "options". Very weird since this can typically be named anything. I think this must be a bug. If not it is a terrible design decision. Declaring the ui-grid with anything else other than "options" and this will not work. Once I changed it to Options, it worked perfectly fine.

WorkMAE avatar Aug 03 '18 17:08 WorkMAE