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
Jeanette Kassulke088-166-7056[email protected]South FriedaPanama
Hosea Hauck857-703-2130[email protected]BennieviewDominican Republic
Emelia Bashirian852-669-1307[email protected]HeaneystadSao Tome and Principe
Claudia VonRueden498-583-4142[email protected]South KamrenCongo
Deion Crist319-733-0441[email protected]RandallboroughMorocco
Camylle Hansen124-850-3345[email protected]West DelphineNew Zealand
Jaiden Greenholt889-473-0252[email protected]AudiebergSaudi Arabia
Aglae Little990-343-2985[email protected]WisokyboroughDominica
Tremayne Harvey699-247-4094[email protected]PabloportCanada
Mekhi Friesen854-842-5560[email protected]Port DarrylTunisia
Morris Kuhic912-653-6130[email protected]East TraceyhavenSaint Kitts and Nevis
Camron Marks744-488-9904[email protected]North ShaneSaint Lucia
Orville King798-732-8590[email protected]Port DariusSaint Kitts and Nevis
Albertha Goyette625-671-2809[email protected]Lake MonroeSaudi Arabia
Jayson Rohan563-584-7194[email protected]New OliverchesterMontserrat
Shad Hintz867-172-2168[email protected]South EarnestUnited States of America
Vita Halvorson234-419-8753[email protected]GislasonviewDenmark
Arno Simonis266-876-4448[email protected]North AraboroughUruguay
Ruthie Kris021-214-4132[email protected]TheahavenIsrael
Emely Blanda612-852-5522[email protected]East AnnastadReunion
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