2011-04-28 73 views

回答

4

如果你想檢查一個DataGrid的事件,那麼我會建議檢查dojox.grid._Events。該對象包含很多DataGrid中包含的事件。

這裏是一個可能適合您的需要的一些事件的列表:

// editing 
onStartEdit: function(inCell, inRowIndex){ 
    // summary: 
    //  Event fired when editing is started for a given grid cell 
    // inCell: Object 
    //  Cell object containing properties of the grid column. 
    // inRowIndex: Integer 
    //  Index of the grid row 
}, 

onApplyCellEdit: function(inValue, inRowIndex, inFieldIndex){ 
    // summary: 
    //  Event fired when editing is applied for a given grid cell 
    // inValue: String 
    //  Value from cell editor 
    // inRowIndex: Integer 
    //  Index of the grid row 
    // inFieldIndex: Integer 
    //  Index in the grid's data store 
}, 

onCancelEdit: function(inRowIndex){ 
    // summary: 
    //  Event fired when editing is cancelled for a given grid cell 
    // inRowIndex: Integer 
    //  Index of the grid row 
}, 

onApplyEdit: function(inRowIndex){ 
    // summary: 
    //  Event fired when editing is applied for a given grid row 
    // inRowIndex: Integer 
    //  Index of the grid row 
} 
+1

'onApplyCellEdit()'這正是我想要的。謝謝! – 2011-04-29 22:57:13

相關問題