var grid = new tui.Grid({
el: $('#grid'),
scrollX: false,
scrollY: false,
header: {
height: 120,
complexColumns: [
{
title: 'Basic',
name: 'mergeColumn1',
childNames: ['name', 'artist']
},
{
title: 'Extra',
name: 'mergeColumn2',
childNames: ['type', 'release', 'genre']
},
{
title: 'Detail',
name: 'mergeColumn3',
childNames: ['mergeColumn1', 'mergeColumn2']
},
{
title: 'Count',
name: 'mergeColumn4',
childNames: ['downloadCount', 'listenCount']
},
{
title: 'Album Info',
name: 'mergeColumn5',
childNames: ['price', 'mergeColumn3', 'mergeColumn4']
}
]
},
columns: [
{
title: 'Name',
name: 'name'
},
{
title: 'Artist',
name: 'artist'
},
{
title: 'Type',
name: 'type'
},
{
title: 'Release',
name: 'release'
},
{
title: 'Genre',
name: 'genre'
},
{
title: 'Price',
name: 'price'
},
{
title: 'Download',
name: 'downloadCount'
},
{
title: 'Listen',
name: 'listenCount'
}
]
});
grid.setData(gridData);