SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.onCurrentRowChanged  event

データ行の位置が変更になった時に発生する。 あまり頻繁なイベントの発生が問題になる場合、 DisplayOptionsrowChangeDelay値を指定すれば データ行の位置が変更になってもその期間内にはこのイベントを発生させない。 

グリッドでデータ行の選択が変更になる時データ行の詳細な情報を他の所に表示するなどに使うことができる。 

function onCurrentRowChanged (grid: GridBase, newRow: Integer, oldRow: Integer);
Returns
Void
Parameters
grid - GridBase.
newRow - Integer.
oldRow - Integer.
Code -1
    grid.onCurrentRowChanged = function (grid, newRow, oldRow) {
        if (newRow >= 0) {
            $('#name').val(ds.getValue(newRow, 'fldName'));
            $('#salary').val(ds.getValue(newRow, 'fldSalary'));
        } else {
            $('#name').val('');
            $('#salary').val('');
        }
    };
See Also
onCurrentChanged
focusedIndex
Examples
Focused Cell