4 Replies Latest reply on Jul 23, 2008 2:36 PM by karoljouis

    DataGrid problem

    karoljouis
      I have a datagrid in my project. It lists all the tasks from the database. When i create or delete or update a task, the datagrid is not refreshing to show the updated tasks. Can anyone help on this? Thank you
        • 1. Re: DataGrid problem
          EDendramis Level 1
          try this:

          dataGridName.invalidateList();
          • 2. Re: DataGrid problem
            karoljouis Level 1
            Thank you for the reply. But It us not working.
            • 3. Re: DataGrid problem
              Level 7

              "rocknrollcar" <webforumsuser@macromedia.com> wrote in message
              news:g67jes$dcu$1@forums.macromedia.com...
              >I have a datagrid in my project. It lists all the tasks from the database.
              >When
              > i create or delete or update a task, the datagrid is not refreshing to
              > show the
              > updated tasks. Can anyone help on this? Thank you

              What are you using as the dataProvider? How are you adding to the
              dataProvider? Are you calling the refresh() method on your dataProvider?


              • 4. Re: DataGrid problem
                karoljouis Level 1
                Data Provider is a XMLListCollection


                <mx:XMLListCollection id="tasksXLC" source="{XMLList(tasksindex.lastResult.children())}"/>
                <mx:DataGrid id="tasksGrid" width="100%" height="100%" dataProvider="{tasksXLC}">
                <mx:columns>
                <mx:DataGridColumn headerText="Name" width="300" dataField="name"/>
                <mx:DataGridColumn headerText="Description" width="150" dataField="description"/>
                </mx:columns>
                </mx:DataGrid>