Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

datagrid

Posted on 2010-11-30
3
Medium Priority
?
613 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

598 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