DataLudi Grid v.1 > Classes > GridBase

Back  Forward

GridBase.onRowInserting  event

ユーザーが既存の行に位置でInsertキーを入力するか、 最後の行で下の方向キーを入力してグリッドの行を追加する直前に発生する。 GridBase.insertをコールする場合も同じである。 

このイベントハンドラの内で明示的にfalseをコールすれば行の追加ができる。 

function onRowInserting (grid: GridBase, rowIndex: Integer);

Returns
Void
Parameters
grid - GridBase.
rowIndex - Integer.
Code -1
    grdMain.onRowInserting = function (grid, rowIndex) {
        if ($('#chkInsert').is(':checked')) {
            return false;
        }
    };
See Also
insert
onRowUpdating
onRowsDeleting