简体   繁体   中英

ag-grid : How to display two columns as single column in the header display?

I have my column defs like below and i have requested to display as Name = First Name + Last Name instead of displaying as two different column in the grid.

网格标题

var users_column = [
 {
    field: 'FIRST_NAME',
    suppressMenu: true,
}, {
    field: 'LAST_NAME',
    suppressMenu: true,   
},

Here is the solution I used before:

var users_column = [
    {
        headerName: 'Name Surname', field: 'fullname', valueGetter(params) {
            return params.data.FIRST_NAME + ' ' + params.data.LAST_NAME;
        }, suppressMenu: true,
    }
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM