3 Replies Latest reply on Oct 18, 2007 7:43 AM by ntsiii

    Datagrid Update...

    Sketch24
      Hi I have an application with multiples datagrid populate with an XMLList (internal). I've made the datagrid editable for quick
      change and at the end of the page there's an update button. I was wondering how I could make it work. The update button is
      suppose to update all the change in all grid. Not just a cell. But all cells with one button. On an other topic Tracy said that you
      can update a column with bindable and arrayCollection. But how to do that with XMLList and all the grids cells not just a column. The question is maybe stupid but Im new to flex so it's difficulte to learn it on my own.

      thanx.
        • 1. Re: Datagrid Update...
          ntsiii Level 3
          I am not quite following.

          Are you trying to make changes in the data be visible in the DataGrid, or are you trying to have the data behind the dataGrid update a database on the server?

          Also, avoid using XMLList as a dataProvider if you ae going to programatically change the data, becuase XMLList methods do not dispatch the necessary events. Instead, wrap it in an XMLListCollection:
          xlcData:XMLListCollection = new XMLListCollection(myXMLList);

          Tracy
          • 2. Re: Datagrid Update...
            Sketch24 Level 1
            ok I will try the xml collection. But the data I want to change is already visible in the datagrid. Like a schedule. I click a name on the schedule (datagrid),change the name cause it's editable and after that I push an update button that save all the change visible and edited in the datagrid. Like a refresh. Cause right now If I make change in a couple cell. QUi the application and open it again, it's back to where it was before with the old data. It's more like a save button for editable
            datagrida that I want do. But I was not sure if it's was possible with the XMLList.
            • 3. Re: Datagrid Update...
              ntsiii Level 3
              "... change in a couple cell. QUi the application and open it again, it's back to where it was before with the old data..."

              If you are not saving the data to a server, then this will always happen. Flex cannot natively save any files anywhere (except Local Shared Object).

              When you say, "...after that I push an update button that save all the change visible and edited in the datagrid...", what do you mean? What does the button do, exactly. Post code if necessary.

              Tracy