質問

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?

役に立ちましたか?

解決

The event is called 'onApply' and is registered on grid.edit (Module-Edit reference)

The example code to achieve that:

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)
})  
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top