Solved

datagrid

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 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.

740 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