I have an application with forms and in each form there is a grid bind to remote data grids.
Enetering in a form, the grid is initialized with datasource and events linke ‘bindingcomplete’ ‘rowdoubleclick’.
Everything works fine except if I quit that form and enter again.
On entering infact, the grid is reinitialized again for a second time:
– the data source is refreshed (perfect)
– the event are initialized for a second time: the bindingcomplete event does reinitialize all the columns, while the rowdoubleclick appears to be ADD to the event list for a second time.
In fact doublecicking on a rows execute the function associated with it two times…
How can I avoid that ?
Is there a method to clear/destroy the events definition to avoid they are creatd two times ?
Thanks in advance
However, we do not recommend initializing the grid and subscribing to its events multiple times. If you need to update the grid, you only have to set its source property again or call its updatebounddata method. Initializing a grid multiple times may lead to unexpected behaviour.