Link to home
Start Free TrialLog in
Avatar of admindesk
admindesk

asked on

datagrid

hi,

i am in a deadlock with some actionscript problem..

suppose i have an xmlCollecition list:
var xmlList:XMLList = new XMLList(master_collList.getItemAt(0).objective_function.constraints.constraint);
      for each(var xmlVal:XML in xmlList)
      dataStore.push(xmlVal.toString());
            conDG.dataProvider = dataStore;

so,  i am providing the dataProvider of the conDG(an instance of my datagrid) with an array containing xml to strings..

now,  in my datagrid, i want to add append another string to the dataProvider of conDG..

how do i do this ?

basically i have an application where users can edit the values already in the dataprovider via the datagrid..but when the user clicks the add button and edits the grid, the changes are not effected becuz the dataProvider does not contain xml but strings...

any help?

 this is code for my user input.. :

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx"
             top="20"
             left="20">

      
      <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <fx:Script source="ConstraintScript.as"/>
      <fx:Metadata>
            [ResourceBundle("optimizationUI")]
      </fx:Metadata>
      
      <s:Button id="addBT" x="178" y="1" skinClass="skins.AddBTskin"
                     click="addBT_clickHandler(event)"/>
      <s:Button id="deleteBT" x="256" y="1" skinClass="skins.DelBTskin"
                     click="deleteBT_clickHandler(event)"/>
      
      <mx:DataGrid width="600" height="220" id="conDG" x="2" y="30">
            <mx:columns>
                  <mx:DataGridColumn headerText="{resourceManager.getString('optimizationUI','constraint')}"/>
            </mx:columns>
      </mx:DataGrid>
      
</s:Group>
ASKER CERTIFIED SOLUTION
Avatar of zzynx
zzynx
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.