5 Replies Latest reply on Jun 26, 2007 12:36 AM by MaxMuld

    How to change datagrid contents?

    MaxMuld
      Okay it is easy to follow the tutorials and populate a datagrid like:

      <mx:DataGrid id="dgmain">
      <mx:columns>
      <mx:DataGridColumn headerText="header1" dataField="col1" />
      <mx:DataGridColumn headerText="header1" dataField="col2" />
      <mx:DataGridColumn headerText="header1" dataField="col3" />
      </mx:columns>
      <mx:ArrayCollection id="arrcol">
      <mx:Array id="arr1">
      <mx:Object col1="cell 11" col2="cell12" col3="cell 13" />
      <mx:Object col1="cell 21" col2="cell22" col3="cell 23" />
      </mx:Array>
      </mx:ArrayCollection>
      </mx:DataGrid>


      :)

      But how do you update a cell value, for instance cell in row 1 coulumn 2 where i want to replace "cell12" with "new value" ?

      Another thing: i want to get data from a sql-server by using a webservice or something so perhaps there is another more easy way to populate and update a datagrid or accordion?