1 Reply Latest reply on Mar 5, 2007 5:50 PM by peterent

    ListView and DetailView in same ViewStack

      I am trying to load a DetailView from a ListView in the same ViewStack.

      The ListView loads a DataGrid with ObjectID's. I am trying to get an Event to change the View in the ViewStack to switch to the DetailView.

      I can get the reference to the ViewStack using the parent keyword. This reference though does not let me do the following;


      'detailView' being the id I gave the DetailView Canvas in the ViewStack.

      If that makes sense I want to ask if anyone can give me a hand.

      Thanks in advance.
        • 1. Re: ListView and DetailView in same ViewStack
          peterent Level 2
          If parent is a ViewStack and that's the only ViewStack you have, then parent.selectedChild = detailView should do it. You could try casting it and see if that works: (parent as ViewStack).selectedChild = detailView. If (parent as ViewStack) yields null, then parent is not a ViewStack.

          Otherwise you might want to post some sample code.