How to use column groups in Data Grid?

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

How to use column groups in Data Grid?

Postby swingman » Wed Mar 01, 2023 1:34 pm

Hi All,

I would like to add some headerGroups in an Data Grid (ag-grid).
There is a property on the column called headerGroup, but I do not know how to use it to get a headerGroup to span several columns...
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: How to use column groups in Data Grid?

Postby mboegem » Mon Mar 06, 2023 9:59 am

There's a property on the grid, called 'groupUseEntireRow', I guess that's what you are looking for.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1749
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: How to use column groups in Data Grid?

Postby swingman » Mon Mar 06, 2023 10:08 am

Thanks for replying Marc, maybe I should have shown an example:

If you look at

https://www.ag-grid.com/javascript-data ... mn-groups/

there is

Code: Select all
const gridOptions = {
    columnDefs: [
        {
            headerName: 'Athlete Details',
            children: [
                { field: 'athlete' },
                { field: 'age' },
                { field: 'country' },
            ]
        },
        {
            headerName: 'Sports Results',
            children: [
                { field: 'sport' },
                { field: 'total', columnGroupShow: 'closed' },
                { field: 'gold', columnGroupShow: 'open' },
                { field: 'silver', columnGroupShow: 'open' },
                { field: 'bronze', columnGroupShow: 'open' },
            ]
        }
    ],

    // other grid options ...
}


The Servoy component gives the impression that you can set the column groups in properties.
Is that the case?
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests

cron