Solved

datagrid

Posted on 2010-11-30
3
601 Views
Last Modified: 2013-11-11
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>
0
Comment
Question by:admindesk
3 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 500 total points
ID: 34427658
>> in my datagrid, i want to add append another string to the dataProvider of conDG..

1. push another string into 'dataStore'

2. Assign it again: conDG.dataProvider = dataStore;

3. and call
    conDG.dataProvider.refresh();

(You could try to ommit step 2)
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 34811371
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to convert pdf file to html file 8 388
Accessing Live Dynamic Stream 6 190
Trying to contour a nose in a face portrait in After Effects 5 98
Flash ActionScript 6 43
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now