Solved

datagrid

Posted on 2010-11-30
3
598 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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. …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

743 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

13 Experts available now in Live!

Get 1:1 Help Now