1

I'm using Dojo 1.9 and GridX 1.2. I'd like to detect the event that given row (or cell) has been changed by the user. Then additional action would be done, for example a row would change background color and the "Save" button would be enabled.

I was searching for the examples and in documentation, but I haven't found an example. How to register a listener reacting to edits in the grid, that would give me information what row or what cell has been edited, with the possibility of reading actual value after change?

4

1 に答える 1

1

イベントは「onApply」と呼ばれ、登録されますgrid.edit( Module-Edit 参照)

それを達成するためのサンプルコード:

grid.edit.connect(grid.edit, "onApply", function(cell, success) {
    var item = cell.row.data()
    var id = cell.row.id
    console.log('Row with ID '+id+' is modified. New value: '+item)
})  
于 2013-07-09T14:00:25.793 に答える