I have a split MasterDetail View setup with tabs on the DetailView.
The SelectedPageChanged events works perfectly if the object in the DetailView doesn't change i.e the selected item in the ListView is the same object type as the one when the control was initially created.
If you select a different type in the ListView, this causes a different DetailView to be displayed and that all works fine as expected.
If you then select a row in the ListView which uses the original object type DetailView with the SelectedPageChanged event the event doesn't fire at all. I've tried subscribing to the event in both the OnActivated and OnViewControls created and it still doesn't work.
I have a instance of the tab groups control which is accessible and is not null when you go back to the "original" DetailView so it's not that the TabbedGroupControl is null or anything like that. No errors are shown when running the code to subscribe to the event again.
I've tried to unsubscribe in the OnDeactivated event and then resubscribe on the OnActivated event but it makes no difference.
As I said, the DetailView works perfectly as long as you don't select a different object type.
If you select a different object type (one that doesn't have this DetailView) then select an object type with this particular DetailView with the SelectedPageChanged event it works perfectly until you change object types just like it does if this object type is the one originally selected.
So it's a case of it works perfectly until the DetailView has been used, changed and then reverted back to.
How can I get the SelectedPageChanged event to fire when the types have changed?
Show all comments