Themes Leave a comment
 
1
jui.ready([ "grid.table" ], function(table) {
2
    table_20 = table("#table_20", {
3
        fields: [ "name", "age", "location" ],
4
        data: [
5
            { name: "Hong", age: "20", location: "Ilsan" },
6
            { name: "Jung", age: "30", location: "Seoul" },
7
            { name: "Park", age: "15", location: "Yeosu" },
8
            { name: "Kang", age: "32", location: "Seoul" },
9
            { name: "Song", age: "12", location: "Gwangju" },
10
            { name: "Yoon", age: "22", location: "Damyang" },
11
            { name: "Kim", age: "33", location: "Busan" },
12
            { name: "Hwang", age: "21", location: "Seoul" }
13
        ],
14
        moveRow: true,
15
        event: {
16
            move: function(row, e) {
17
                return confirm("Do you want to change the row position?");
18
            },
19
            moveend: function(row, e) {
20
                console.log("Completed.");
21
            }
22
        }
23
    });
24
});

Result
API