Hi,
I have a Datagrid with Form created using the default process. The Form is spread over 4 tabs hence 4 templateForms.
I have amended the notification of templateForm0 for the relevant XXXupdateYYY section of the Submit event to be sure it is the right one I am working on.
Editing one entry (of YYY) doesn't automatically refresh grid0.
In the Submit event, I have added grid0.Reload(); after notification is done and still no refresh. Having this.grid0.Reload(); does not work either.
If I reselect the same entry (row) in grid0, the new value will show.
I am suspecting I am doing wrong but can't figure out what.
Best regards,
Fred
Invoking the Reload method does not fetch data from the database. You need to execute the code that is normally in the Load event of the page which invokes getXXX and sets the page property to which the DataGrid is bound to.
Hi Korchev
Every time I select a row, I am updating some fields using calculation relying on data stored in a view. If I add the same code to the templateForm, I get a message saying that the component already contains a definition for the same property created when I invoke the datasource (ie the view).
I am not keen to go directly into the code but as all numbers come in order when I click on the datagrid row, I would think that what could work would be to get the Submit event of the templateForm, after it has sent the notification, to select the same record in the grid. Maybe not super clean but that should do the trick.
I read that I probably need to have the record id defined at the page level (set property, name thatRecord, value: ${xxx.id}) but I have not found how to get it selected in the datagrid.
Best regards