Jacobian
Jacobian

Reputation: 10802

Grid: How to prevent row deselection on hit Enter?

My grid uses CheckboxModel and CellEditing plugin. When the user types something in a field and hits Enter button, then I see that checkmark disappears from the first ckeckbox column. But at the same time getSelectionModel().getSelection() shows, that one row is still selected. This behaviour is quite weird and may confuse ordinary users. So, I need some workaround.

Here is a picture of what is going on. Before:

enter image description here

After:

enter image description here

As you can see, there is no longer checkmark in the first column and no selected records, but getSelection() still shows one record being selected.

Upvotes: 0

Views: 127

Answers (1)

Tyr
Tyr

Reputation: 2810

After enter you could try fetching the record you had edited and use grid.getSelectionModel().select(record, true, false)

Upvotes: 2

Related Questions