Event ordering (onEditCell / onRowSelect)?

If I have onEditCell and onRowSelect, the event handler for onEditCell runs before onRowSelect.

How can they be ordered properly? It would make sense if row select ran before the edit cell event…

It messes things up because if I’m in edit mode in grid A, and the row select code runs, and does something like selects a row in grid B, it will exit grid A from edit mode.

But if the event handlers ran in the correct order, the row in grid B would be selected, and edit mode would be entered afterward in grid A.

You can see the events are ordered this way if you turn single click edit mode on, because it always will run the editCell before the row select.

This is expected scenario, onRowSelect event fired when built-in on-select reaction is already processed. You can try to use onBeforeSelect event, which occurs before onEditCell

Tried it, a lot of things don’t work normally when I use the onBeforeSelect.

The row isn’t highlighted, and the grid never goes into edit mode when I click on cells.

I don’t see why a cell edit event handler should be running before the row select one, it doesn’t make sense. It seems reversed to me.

With double click mode on, you will generally be running the row select event handler first
With single click on, it always runs the cell edit event handler first.

Are there any other alternatives, or can the ordering be changed?

Be sure to return true from the event handler.

Runs the code fine, the return value doesn’t seem to help though

When non-true value is returned from event, it will mean blocking of default reaction. In case of onBeforeSelect - it will prevent any row selection.