selectionChanged

Fired when the user change selection of the grid cells or rows.

The following additional properties are available on the event object:
- selected - a list of rows or cells that were selected with the current action
- viewIndices - a list of view indices of the selected rows
- indices - a list of data indices of the selected rows.

$("#grid").shieldGrid({
    dataSource: {
        data: [
            { ID: 1, name: "name1" },
            { ID: 2, name: "name2" }
        ]
    },
    columns: [
        { field: "ID" },
        { field: "name" }
    ],
    events: {
        selectionChanged: function (e) {
            var selected = e.target.contentTable.find(".sui-selected");
            var message = document.getElementById("message");
                           
            if (selected.length > 0) {
                message.innerHTML = selected.get(0).innerHTML;
            }
            else {
                message.innerHTML = "";
            }
        }
});