Hi,
I have a master/detail ListGrid and I want to validate the current detail form whenever the user clicks another line in the grid, and cancel that select if the detail form isn't valid.
In this sample, you can select a line, clear SKU & Category, and select another line, losing the edits (I can send multiple lines in 1 go the server instead of expecting the user hitting save before he selects another line).
I did this in onSelectionChanged, but now I see it doesn't implement Cancellable. Then I tried it onRecordClick, but that is fired after the selection has changed, so it's too late.
So I'm just guessing around to find the correct moment where I can deny the new selection... I think I'll create a sample, add all possible handlers, and see which are Cancellable and react on mouse click/keyboard select.
I was thinking of creating this on the wiki, but maybe it already exists, does it?
is there a place or way to find out the order of events firing? With different scenario's as well: is the grid editable, is the row editable etc.
As I've seen some posts where you decided to change the order, so the document could become outdated.
thanks
I have a master/detail ListGrid and I want to validate the current detail form whenever the user clicks another line in the grid, and cancel that select if the detail form isn't valid.
In this sample, you can select a line, clear SKU & Category, and select another line, losing the edits (I can send multiple lines in 1 go the server instead of expecting the user hitting save before he selects another line).
I did this in onSelectionChanged, but now I see it doesn't implement Cancellable. Then I tried it onRecordClick, but that is fired after the selection has changed, so it's too late.
So I'm just guessing around to find the correct moment where I can deny the new selection... I think I'll create a sample, add all possible handlers, and see which are Cancellable and react on mouse click/keyboard select.
I was thinking of creating this on the wiki, but maybe it already exists, does it?
is there a place or way to find out the order of events firing? With different scenario's as well: is the grid editable, is the row editable etc.
As I've seen some posts where you decided to change the order, so the document could become outdated.
thanks
Comment