Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 1021 Bytes

README.md

File metadata and controls

31 lines (27 loc) · 1021 Bytes

QmlGrid

DataTable.qml has the main control, it depends on a couple other files.

Some examples are shown in ExampleGrid1.qml and AdvancedExample.qml

Simple grid

image

DataTable {
    id: tableId
    columns: [
        {name:"name", label: "First Name", type:"string"},
        {name:"lastName", label: "Last Name", type:"string"},
        {name:"age", type:"number"},
    ]
    rows: [
        {lastName: "Bobberson", name:"bob", age: 4}, 
        {lastName: "be", name: "jo", age: 6},
        {lastName: "ington", name: "Alex", age: 50},
        {lastName: "Butterfly", name: "Rebekah", age: 22},
    ]
    onColumnHeaderClicked: {
        print("sorting column: " + column.name);
    }
    onCellClicked: print("clicked cell:" + column.name + "|" + row.name)
}

Advanced grid

image