Documentation

Report Edit

Grid with Complex Header

Grid control supports up to three header lines. Header cells can be merged using colSpan and rowSpan attributes, similar to how tables work in HTML.

NameContactAddress
PhoneEmailCityCountry
Queenie Bechtelar541-417-3152[email protected]JudybergAndorra
Amanda Roob477-426-2787[email protected]GoldnerchesterNorthern Mariana Islands
Belle Balistreri367-887-0002[email protected]Port ChrisChina
Carmella Barton243-799-3601[email protected]RamirohavenEl Salvador
Kolby Rosenbaum888-415-1035[email protected]West ErwinGuadeloupe
Kaley Stehr293-607-8985[email protected]JovannytownMontserrat
Kristopher Schaden740-989-0292[email protected]StefanvilleBelarus
Norval Bechtelar511-232-7884[email protected]AlvisburyGuam
Larissa Kuhlman493-470-7172[email protected]LueilwitzchesterTrinidad and Tobago
Dell Terry641-218-0123[email protected]South SaraiZimbabwe
Natalie Stracke515-900-4861[email protected]GrimesvilleBulgaria
Belle Cole166-859-5550[email protected]East KelsieNauru
Waldo Beier964-729-6823[email protected]ClarabellefurtUganda
Enos Orn663-856-9962[email protected]RonaldostadSerbia
Nikita Von295-175-7092[email protected]ErnestineshireAngola
Barney Kutch125-316-5218[email protected]Port OceaneCook Islands
Lloyd Koss754-447-3275[email protected]Lake ValentinburyTurkmenistan
Cecelia Abshire060-455-3769[email protected]RusselchesterChina
Branson Block775-458-2253[email protected]East BennySuriname
Delbert Zemlak460-644-8968[email protected]New LeonelTajikistan
ControllerIndex
<Grid records-bind='$page.records'
    style={{width: "100%"}}
    columns={[
        {
            header1: {
                text: 'Name',
                rowSpan: 2
            },
            field: 'fullName',
            sortable: true
        }, {
            align: 'center',
            header1: {
                text: 'Contact',
                colSpan: 2
            },
            header2: 'Phone',
            style: "white-space: nowrap",
            field: 'phone'
        }, {
            header2: 'Email',
            style: "font-size: 10px",
            field: 'email',
            sortable: true,
            align: 'center'
        }, {
            header1: {
                text: 'Address',
                colSpan: 2,
                align: 'center',
                allowSorting: false
            },
            header2: 'City',
            field: 'city',
            sortable: true
        }, {
            header2: 'Country',
            field: 'country',
            sortable: true
        },
    ]}
    sorters-bind="$page.sorters"
/>
Copied!Cx Fiddle