columnReorder

Fired when the columns are reordered:

$("#grid").shieldGrid({
    dataSource: {
        data: [
            { ID: 1, name: "name1" },
            { ID: 2, name: "name2" }
        ]
    },
    columns: [
        { field: "ID" },
        { field: "name" }
    ]
    events: {
        columnReorder: function(e) { 
            // TODO: 
        }
    }
});

The arguments which are passed are following:

  • e.index – the old index of the reordered column
  • e.newIndex – the new index of the reordered column