Flex :: Data Cannot Be Grouped Outside App And Return ArrayCollection

Sep 23, 2011

I have flat data in my app which I will need to group, summarize, and count as I normally would with a sql query. For this project though, it must be done in the flex app. I need to figure out how to group my data by day or month using a datatime field in my Arraycollection, then appropriately count or summarize data in other fields. I've used Groupingcollections before, but only when binding to hierarchical controls (like AdvancedDataGrid and Tree), but I need a resulting ArrayCollection with the grouped and summarized data. Basically, I'm trying to access my AC like a sql table (GROUP BY MONTH(datetime), COUNT, COUNT(DISTINCT(), etc.) and I'm unsure how to do it.

View 2 Replies


Similar Posts:


Flex :: AdvancedDatagrid Does Not Display Grouped Data?

Mar 10, 2012

I am trying to display grouped data in AdvancedDatagrid but the data does not show up. When I specify the dataprovider without the grouping collection I am able to see the data. Is there something wrong with this code?

<mx:AdvancedDataGrid id="dgAssetStatus" width="100%" height="85%" initialize="gc.refresh();">
<mx:dataProvider>

[code].....

View 1 Replies

ActionScript 3 :: Flex ArrayCollection GetItemIndex Always Return -1

Dec 21, 2011

My code is:
var dataList:ArrayCollection = new ArrayCollection([{name:"alauddn"}, {name:"ansari"}]);
private function getItemInd(event:MouseEvent):void{
var item:Object = new Object();
item.name = "ansari";
var ias:int = dataList.getItemIndex(item);
Alert.show(ias.toString() + ": " + item.name);
}
But it returns "-1:

View 3 Replies

Flex :: Value In Datagrid Itemrenderers Set Data Method Doesn't Return The Correct Data?

Jan 10, 2012

I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.

<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......

without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;

<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........

_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.

View 1 Replies

Xml :: (Flex 3) Get Data From A File Using HTTPservice And Save The Return Data As An Array?

Oct 15, 2009

I have an xml file (externally saved) that is similar to the following:

[root]
[main]
[title]...[/title]

[Code]....

What I like to do is to get what's in [title] tag using HTTPservice, import it into Flex, and save it as array objects, and do the same thing for [content]. This way I can later refer the array object saying title[0] or content[2].

View 1 Replies

Flex - To Change Xml Data To ArrayCollection?

Jun 3, 2010

I have xml file with data as below and i want to convert this into Flex ArrayCollection including the id and name of the tags. I am using httpService to get the file.

[Code]...

View 1 Replies

Flex :: Populate Tree Using Data From ArrayCollection?

Apr 6, 2010

Let's say I had an ArrayCollection like this:

public var ac:ArrayCollection= new ArrayCollection([
{item:"dog", group:"Animals"},
{item:"orange", group:"Fruits"},

[Code]....

How would I create a Tree component in Flex 3 that uses the groups as nodes, with the appropriate items listed under each node?

View 2 Replies

Flex :: Why List Not Displaying Data From ArrayCollection

Feb 23, 2011

I'm working on a flash cards application and am using an ArrayCollection of Objects to store each cards individual data. When the user click the 'save' button, the text from the two textAreas and the 'title' textinput are stored in the AC as one object with .title, .side1 and .side2 properties that contain the text from the flash card. I have made a List in a separate class I want to have display the title of each card the user has created, but after days of researching and looking around, I still cannot get the display to list the titles.

Part of my NewCard.mxml:
<?xml version="1.0" encoding="utf-8"?>
<fx:Script><![CDATA[
import flash.events.EventDispatcher;
import mx.collections.ArrayCollection;
import spark.effects.SlideViewTransition;
[Code] .....

View 1 Replies

Flex :: Access Data Of A ComboBox With An ArrayCollection DataProvider?

Nov 10, 2009

[code]...

Here am getting array of groups(groupName,GroupID each row ) from a RemoteObject and displaying in a ComboBox. I am selecting the groups with selectedIndex as 0,1,2,3, but I want my groupIDs of correspoding groupnames,which am bringing to client side.

How can I get actual the groupId of the selected group?

View 1 Replies

Flash :: ArrayCollection Of Data For Label Test In Flex?

Jan 26, 2011

My label text is not showing up after binding the arraycollection to the label text. Could I see an example of how to properly bind an arraycollection to a labels text?

View 2 Replies

Flex :: Using Arraycollection As Bind Variable Gives Empty Data?

Jul 24, 2011

i would be glad if anyone can answer this.

i have an actionscript class as follows:
package
{

[code].....

View 2 Replies

Javascript :: Flex - Populate Combobox With ArrayCollection With Data

Mar 7, 2012

I am developing a panel in Photoshop with Flex and Extendscript. I am pretty close to getting this to work, but with my Flex skills I am having a little issue with the Array I am pulling in from the jsx file. The array is displayed fine in the alert box, but somewhere between my split and creating new collection something is wrong.

Here is my Flex

protected function loadData():void {
var grabFolderNames:SyncRequestResult = CSXSInterface.instance.evalScript("labNames");
var list:String = grabFolderNames.data;

[Code]....

View 2 Replies

Flex :: Make Changes To An ArrayCollection Bound To Data Grid Live?

Feb 21, 2010

I have an ArrayCollection bound to an editable DataGrid, another component needs to know when the ArrayCollection changes (as a result of changes in the DataGrid) so it can also update itself, so is listening to the COLLECTION_CHANGE event of the ArrayCollection.

The problem is that the DataGrid only updates the ArrayCollection when the row being edited losses focus. This is not good for my app as a user could edit a column on a row and not click elsewhere on the table for a long time (causing the row to lose fucus), therefore the changes won't have propagated to the other parts of the application.

How can I make the data grid inform the ArrayCollection of a change every time there is a keyup event on a text input instead of every time a row looses focus?

View 2 Replies

Flex :: Efficiently Fill Data Gaps In An Sparse ArrayCollection?

Aug 10, 2010

I have an ArrayCollection of Objects. Each Object with three attributes:CustomerID, Income and DateMy goal is to chart this data for each customer (or a couple together) in a Income by Date LineChart display. Selection of customers is done with ArrayCollection filters.Data is fetched from an SQL database, however, each customer has some data points missing.f there was zero income on August 8, 2010 there will be no entry for that.Charting the ArrayCollection as is, is misleading because there is no indication of the missing data points.One way to solve this is to artificially add zero points for the missing dates for each customer. However, this would explode the data set (and impact performance).

View 1 Replies

Flex :: Merge Data Into Filtered ArrayCollection (maybe By Using IViewCursor Or LocalIndex)?

Jan 5, 2012

how do you merge data (coming repeatedly from server) into a filtered ArrayCollection?

The TestCase.mxml (just place it into a Flash Builder 4.6 project):

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

[code]....

The problem lies in the fact, that when the ArrayCollection _data is filtered (because the Checkbox "Even" is set), then the 2nd loop in the test case (for adding new items) adds items (the "35") again and again - because it's filtered and thus not visible.

View 1 Replies

ActionScript 3.0 :: Flex Delete A Tree Node Having A ArrayCollection As Data Provider

May 20, 2010

I have a Flex tree with an ArrayCollection as data provider. The ArrayCollection is composed by objects linked eachother by the "children" field (that is an Array containing other children objects)

[Code]...

View 1 Replies

Actionscript 3 :: Return ArrayCollection From SELECT Query

Oct 23, 2011

In my AIR app i am trying to get the names from sqlite database as an ArrayCollection . Here is my code.

private function visitorName():void {
var sqlText:String = "SELECT name FROM user";
visitorNames = new SQLStatement;

[Code].....

What should i do to get the results to an ArrayCollection by calling the visitorName() function? Is it possible to get return value from a nested function?I know the visitorName function should be changed to ArrayCollection type and should declare an ArrayCollection variable inside it .. but not so sure how to proceed .

View 1 Replies

Flex :: Why Change In ArrayCollection's Length Doesn't Invoke Setter On Component Using It As Data Source

Dec 15, 2010

I have a component where I expose the property 'questions' with the following code:

private var _questions:ArrayCollection;
private var questionsChanged:Boolean;
[Bindable("questionsChanged")]

[Code]....

In this component, I use commitProperties() to implement my logic.

I use Cairngorm and the 'questions' is in the model and hence it's defined as a source for data binding.

When the 'questions' ArrayCollection's size changes elsewhere in the application, it is not invoking the setter method in the component that is destination for the data binding.

View 1 Replies

Flex :: Export Grouped AdvancedDataGrid As CSV Text?

Sep 16, 2010

I'm trying to export an AdvancedDataGrid to CSV. This is easy enough for non-hierarchical data, but when using a HierarchicalCollectionView to show treed data it gets trickier.

how to access each of the cells just as they appear on screen when all of the nodes are expanded?

View 2 Replies

Flex :: Sort Grouped Columns In AdvancedDatagrid

Feb 1, 2011

I#m looking for a solution to sort all grouped colums in advancedDatagrid. It should be the same behavior like clicking in a columns head. i'm not looking for a solution to sort the fields IN a the grouping. There is working solution named compareFunction. But I'm not able to sort the two rows in my picture by column "Einnahmen". Sorry for the german word.

View 4 Replies

Flex :: Mxml - Components Bound To Empty ArrayCollection At Load Time Don't Render As Expected When The ArrayCollection Is Updated?

Oct 27, 2009

I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>

[code].....

View 2 Replies

Flex :: Have Ungrouped And Grouped Items Mixed In Same Datagrid?

Apr 7, 2011

Is there a way to have ungrouped and grouped items mixed in the same datagrid?

For example, think of a grid that lists the root items on a C: drive.

Obviously, we would want the Directory Structure to be group and expandable. But the files on the root drive would also be shown on the list, however they would not be grouped.

View 2 Replies

Actionscript 3 :: Flex Waiting For Httpservice To Return Data

Dec 21, 2011

I'm getting really annoyed by Flex. Is there a way to make it wait for an httpservice to get its data without having to use a timer?

At the moment my code looks like this:

protected function loginUser(event:MouseEvent):void
{
if(txtEmail.text == "" || txtPassword.text == "")
{

[Code].....

When I do user.login(), it sends a request with a HTTPservice from my external AS class. In the result event handler for this httpservice, I set a public variable to true or false, depending on whether the user's credentials are correctly in the DB.

I then use a getter to get that boolean value. However, without the timer, it always returns false because my code is faster than the event result handler. If that makes sense.

So I have to use a timer to stall my application for one second.. But seriously, that doesn't make sense to me. There has to be a better way, no?

View 3 Replies

Flex :: Object To Arraycollection - Unable To See Any Data Display In "S" Which Is A Datagrid?

May 14, 2011

linedataColl is an AC that contains 100+ of rows extract from CSV, I wish to add item into SuperDataCollection object by object but the only problem was I'm unable to see any data display in "S" which is a datagrid. What wrong with my code?

var superDataCollection:ArrayCollection = new ArrayCollection();
var dc:ArrayCollection = new ArrayCollection();
var di:Object = new Object();[code]......

View 1 Replies

Data Integration :: XMLReader Class / No Data Is Been Return

May 19, 2007

I have a question about my xmlReader.as file about XMLReader class.this will be xmlreader class , but i can not take the data.

View 1 Replies

Php :: How To Access ArrayCollection Data

Jun 24, 2010

I know this one might be easy but I couldn't figure out.I have a List control that retrieve multiply data from Mysql. When a use clicks the data on List, The datagrid will display the data and the product image will show.I can see the multiply data shown in my dataGrid, but I don't know how to get the individual data shown.

<s:List id="compList"
width="250"
height="350"

[code]........

View 1 Replies

Actionscript 3 :: Insert XML Data Into An ArrayCollection?

Apr 13, 2010

How do I insert XML data into an ArrayCollection in AS3?

View 2 Replies

ActionScript 3.0 :: ArrayCollection As Tree Data Provider

Mar 11, 2009

I have been trying to populate a tree control via an httpservice that uses php to talk to a database. The queries work fine and the data comes back in the following format from php:
echo "<root>";
echo "<topic>";
echo "<sectioncode>$sectioncode</sectioncode>";
echo "<children>";
echo "<labtitle>$title</labtitle>";
echo "</children>";
echo "</lab>";
echo "</root>";

Flex can see this and interprets the heirarchy fine unless i try to format the resultformat in the httpservce (if i do that it goes a little nuts). The results from the php query to the db come back as an ArrayCollection with each containing a "root->topic->sectioncode->title" type of structure (which is what I want). When I go and try to use this Arraycollection as a dataprovider for a tree control, it doesn't work at all. When I use the arraycollection as the dataprovider I get [object,object] for every row in the tree and there is no parent/child structure.

Ideally I would like the title to be a child of the numbercode, but when i try and format the return from xml like that the number becomes and object without a value and the title becomes a child. I have a feeling that I am missing something in the php return to show the structure to flex more clearly and also something in the tree to implement it as the data provider better. Here is the code that I am using in the tree:
<mx:Tree x="25" y="48" height="451" id="ilabtree" dataProvider="{labarray}" labelField="@title" width="152" textAlign="center"></mx:Tree>

View 1 Replies

Actionscript 3 :: Data Binding Object Converted To ArrayCollection

Jun 23, 2011

I have a somewhat complex parent/child hierarchy object that I need to display in a tree format that dynamically updates. To pass it into the tree as a dataprovider I convert the top level parent into an Array and then into an ArrayCollection. The problem there is if anything changes in the hierarchy the tree isn't dynamically updated unless I regenerate the dataprovider.

EDIT: I didn't have much code shown so I just tried to include the skeleton version of how everything is being used below, the tree works fine and even when I remove/add nodes the changes are evident but the vertical scroll bar isn't updated(doesn't resize) and if I scroll the tree will get out of whack and may display whitespace at the bottom of the tree where the item was just removed.

I tried just a plain bindable ArrayCollection test object with multiple levels and it updates properly so I think my tree is fine it's just how I'm trying to bind the dataprovider that I'm having the issues.

AS3 Class 1 - Object that can have plenty of child objects of itself by calling insertCustomObject()

public function CustomObject() {
}
public function insertCustomObject(customObject : CustomObject) : void {

[Code].....

View 1 Replies

Flash :: Display Data Using ArrayCollection To A Control That Without DataProvider?

Mar 11, 2012

I know how to display data in a List control using dataProvider but what about control that don't have dataProvider e.g. TextInput, Label contorl?[code]Try to use {dp.ID} and {dp.getItemAt(0).ID} on TextInput but nothing being display?How to make TextInput id=" first Name" able to display the SQL data?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved