Listgrid Selections Loses Focus

I am using version 6.0 of the library.

I have a Listgrid and a dynamic form based on the same Datasource. When an item in the list is selected, the form is filled in and editable. When the form is saved, the selection in the listgrid (the one just saved) loses focus and is de-selected.

Is this by design? Is there a work around?

Please let me know.

Paul

It is by design - because of the server’s ability to generate new field values, the record returned by the server is logically a new record. Selecting the record after the new data has arrived may have new consequences (or might even be impossible - the record could come back disabled, newly editable..)

To re-select that record, you could pass a callback to saveData() that locates the record by calling grid.data.find(“primaryKeyFieldName”, primaryKeyValue), and then calling grid.setSelected(record).