问题
I have a form(for which the datasource is Table A ) from which i am calling a dialog and i enter few parameters and click on Ok. The process fills up data in Table A .
Once i close the dialog, it does fill up the table and does not show in form , i will have to do a refresh the form(pressing F5 ) . how is this possible via Code
回答1:
I've blogged about this, so here's also some insight on how to refresh a form's DataSource:
http://devexpp.blogspot.com.br/2012/02/refresh-datasource-and-retain-position.html
Basically, all you have to do is call the research() method, but there's also some tricks to retain the position of the refreshed DataSource.
回答2:
Perhaps this very popular tutorial by Vanya Kashperuk will help. It is about how to refresh data presented in a form, below are your options:
formDataSource.refresh();
formDataSource.research([true]);
formDataSource.reread();
formDataSource.executeQuery();
来源:https://stackoverflow.com/questions/10114112/refresh-issue-on-the-form-when-the-dialog-closes