Hi,
I want to implement docking in our windows, but I have a little problem.Our windows typically contains lots of data which often is master-detail related,so lets say that we have a master grid and the active row in that grid controls thedata in 5 other grids. I want the users to be able to show/dock/tab/hide these5 grids as they want. The data in a detail grid is fetched fom a server when themaster row changes and I don't want to get any detail data for a detail grid that is not visibleto the user.
Therfor I need to know when a control in dockablecontrolpane is visible or not, and alsoI like to have an event when this state changes. This way a detail control will be notifiedthat "now you are visible" (for instance selected in a tabgroup, or flied out) so it can be populatedwith data for the master row. And similar that the Control/Pane knows thatit is visible when the master row changes and retrieves the data directly.
I have been experimenting with the docking, but haven't found out how to this in a correctand reliable way.
-tomas.
You can check the IsVisible property of any pane to determine if it is not hidden. As far as getting notified when the visibility changes, you can hook the PaneDisplayed and PaneHidden events of the UltraDockManager.
Sorry, I should have said that I'm using 2005 Vol3 which doesn't seem to have those events.
In addition the IsVisible is for instance true when the pane is in a tab group and not visible (selected) and false when the pane is "flied out" (and not pinned).
In that version there is no other way to get notified when panes are shown and hidden, and it sounds like that version also had a bug with the IsVisible property. However, that version is no longer supported. I can only recommend that you upgrade to a newer version. I believe the events were added in the 6.2 release, so any of the currently supported releases should have them. If you do not have a subscription anymore, use the trial version first to make sure the latest version performs as expected and the bug with IsVisible has been fixed.
There is no other property for this. If the pane's IsVisible is True, you would have to check it's Parent group's ChildPaneStyle. If it is set to TabGroup or SlidingGroup, then the pane will only be visible if its IsSelectedTab is True. You will also have to do this check on all parent groups up the parent chain:
private bool IsPaneVisible( DockableControlPane pane ){ if ( pane.IsVisible == false ) return false;
DockablePaneBase childPane = pane; DockableGroupPane parentPane = pane.Parent;
while ( parentPane != null ) { if ( parentPane.ChildPaneStyle == ChildPaneStyle.TabGroup || parentPane.ChildPaneStyle == ChildPaneStyle.SlidingGroup ) { if ( childPane.IsSelectedTab == false ) return false; }
childPane = parentPane; parentPane = childPane.Parent; }
return true;}
I am using infragistics dock manager (ver 8.1).
When I tried with the property IsInView it is giving always true.
As I need to find whether a DockableControlPane is currently viewing in main window.
I tried with IsSelectedTab, IsVisible, but none can satisfy my requirement.
Is there any other property exists in dockablecontrolpane for this solution.
regards,
Ceaser
I would recommend submitting the issues with the IsVisible property to the support group: http://es.infragistics.com/gethelp.
Tried with 2007 Vol3 and the events seems to work as I expect, but the IsVisible flag seems to be as bad as in my version (2005 Vol 3).