0 Replies Latest reply on Oct 7, 2010 5:26 PM by nlk10010

    Resetting Grid in Tab Navigator

    nlk10010 Level 1

      I have two states in my project, say 1 and 2. In 1 there is a button which switches to state 2. In 2 I've got a TabNavigator containing several child NavigatorContent objects. In one of the tabs I have a data grid. What I'd like to do is, each time the user selects the tab containing the grid, to have the first row in the grid selected. Once in the tab they can move the highlight up and down but if they go to another tab and then come back I'd like the first row selected. If they switch back to state 1 and then come back to 2 and then select the tab containing the grid I'd like the first row selected.

       

      I've tried setting the datagrid's selected index to 1 from the click handler of the button in state 1 but even THAT doesn't work. I've tried setting the datagrid's selected index to 1 from a Show event hooked to the tab containing the datagrid, still no go.

       

      As an aside, I'd also like to have the first tab selected each time the user clicks the button to go from state 1 to 2, but I figure one thing at a time.

       

      Can anyone give me a pointer to the right event or method(s) to use?

       

      Thanks.