Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2077
WinGrid's events raising order
posted

Hi,

I have the following situation: on a form there are two WinGrids, one showing the child rows of the row selected in the other. After adding a new row in the master grid the child grid should be made active so the data entry could continue in it. When the data in a row is modified the focus should remain in the master grid.

To edit the rows in the master grid I am using RowEditTemplates. New rows are added via an Add Row at the top of the grid.

I was trying to move the focus on the child grid in the AfterRowUpdate on the master grid, but this event was raised before AfterRowEditTemplateClosed after which the newly added row was selected again, so the master grid regained the focus.

Then I have tried to move the focus to the child grid in the AfterRowEditTemplateClosed event handler, but again the newly added row was selected, and the master grid regained the focus.

Which is the order in which the events related to a row being added or updated are raised? Which event should I use so I can move the focus to the child grid when a new row is commited to the master grid?

Thanks,

Emanuel