I have datatable and form binded together. I use dataFeed to get adittional data when updating. Now I want to set defaultData when I create new item.
Now dataFeed is called also for creating item because of defaultData (before it wasn0t). Is now correct way to check if it is ID and load additional data (from) and if not setValues to form?
Datatable and form are bind together. For adding I set unselectAll so I have empty form. On datatable I set defaultData. I get default data in form. I enter all other data and save form. Data is add to datatable and send to server. New item is not selected in datatable also cursor is set to null. But connection is still there. Because form is still populated with values. I fixed this with calling clear form. But this is not right way. Because now I have problem with defaultData. If I call setCursor(null) or unselectAll have no effect.
Here is the real question. How do I “unselect” item after data insert?