1 Reply Latest reply on Jul 23, 2008 6:37 AM by Newsgroup_User

    refresh the data in a datagrid

    wkolcz Level 1
      I have a pop up that allows you to create a project. How can I then refesh the parent component to reflect this? I found an example, but it doesn't seem to work for me and I cannot see how the code they wrote would invoke this.

      parentDocument.sViews.selectedIndex=0;
      parentDocument.dgFillView.membersInclude.initApp();

      I see that the first line returns it back to the first viewstack item, but mine is a popup over the main listing. The second line invokes the component membersInclude and the creationComplete function of initApp(), but I am not sure where the dgFillView is coming from

      here is the example I found:
      http://www.fusionpage.com/flex/demos/bin/demos.html#app=2cb5&b4a1-selectedIndex=0&b8fc-sel ectedIndex=0&31-selectedIndex=0&105f-selectedIndex=0&9ce7-selectedIndex=0
        • 1. Re: refresh the data in a datagrid
          Level 7

          "projectproofing" <webforumsuser@macromedia.com> wrote in message
          news:g658lr$nme$1@forums.macromedia.com...
          >I have a pop up that allows you to create a project. How can I then refesh
          >the
          > parent component to reflect this? I found an example, but it doesn't seem
          > to
          > work for me and I cannot see how the code they wrote would invoke this.
          >
          > parentDocument.sViews.selectedIndex=0;
          > parentDocument.dgFillView.membersInclude.initApp();
          >
          > I see that the first line returns it back to the first viewstack item, but
          > mine is a popup over the main listing. The second line invokes the
          > component
          > membersInclude and the creationComplete function of initApp(), but I am
          > not
          > sure where the dgFillView is coming from
          >
          > here is the example I found:
          >
          > http://www.fusionpage.com/flex/demos/bin/demos.html#app=2cb5&b4a1-selectedIndex=
          > 0&b8fc-selectedIndex=0&31-selectedIndex=0&105f-selectedIndex=0&9ce7-selectedInde
          > x=0
          >
          Your link didn't work for me (went to a blank black page), and even the
          front page of that site is so slow and annoying that I'm amazed you managed
          to find anything there. You're going to have to post more code if you want
          an answer, since there's not enough info in your post to hazard a guess.
          The little you did post suggests the source of the example file is using
          some bad practices, so you might be able to shortcut the process by looking
          for a different example. Instead of looking for an example that has a
          component calling out to its parent, which is bad practice, you should
          probably look for an example that has the component broadcast an event and
          the parent listen for and react to that event.

          If you have access to Flex 3 (or 2) Training from the Source, there's an
          example in there where they start out doing what you're trying to do and
          then quickly fix it to reflect best practices.

          HTH;

          Amy