When using the DataGrid Control of easyui, it is very easy to construct a composite header. You only need to write the column name in array mode when using the columns attribute. For example, we need to construct a header as follows:
The code for columns is as follows:
Columns: [[{field: '_ id', Title: 'line', fixed: True, rowspan: 2}, {field:' _ J', title: 'railway authorization', fixed: True, colspan: 2}], [{field: '_ id', Title: 'Beijing authorization', fixed: true}, {field: '_ J', Title: 'Ha Bureau', fixed: true}]
Note that when building a composite table header, the values of colspan and rowspan used by the merged cells must be numbers rather than characters. For example
{Field: '_ CJ', Title: 'side shelf ', width: 20, colspan: 9}
But not
{Field: '_ CJ', Title: 'side shelf ', width: 20, colspan: '9 '}
Building a composite table header in datagrid in easyui