четвъртък, 16 януари 2014 г.

JavaScript Grid Selection

In this blog entry, we review the Selection capabilities of the ShieldUI Grid control. 
The ShieldUI Grid component supports selection out of the box.
You can customize the selection behavior further, by setting properties in the "selection" section.
This is demonstrated below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$("#grid").shieldGrid({
    dataSource: {
        data: [
            { ID: 1, name: "name1" },
            { ID: 2, name: "name2" }
        ]
    },
    selection:
    {
        type: "cell",
        multiple: false,
        toggle: true
    }
    columns: [
        { field: "ID", title: "Unique Number", format: "{0:c}" },
        { field: "name", title : "Name", width: "300px" }
    ]
});
The type property specifies whether selection will be row-based or cell-based.
The multiple property specifies whether multiple elements can be selected.
The toggle property determines whether selecting an element will toggle or turn off the previous selection.
To view an example of single selection, click here. You may also want to review multiple selection.

Няма коментари:

Публикуване на коментар