Flex :: Filter Only Certain Column In Array Collection?
Jul 13, 2009Is it possible for me to filter only a certain column in a arraycollection but still displaying the other values in a datagrid?
View 1 RepliesIs it possible for me to filter only a certain column in a arraycollection but still displaying the other values in a datagrid?
View 1 RepliesIs there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5...
here is the thing i want:::
I have array values like this,,
array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];
and i want to show these values on the Yaxis and months on Xaxis....
I have two Qns,
1) how can I pass this array to Bar chart or column chart.
2) how do I need to show months on Xaxis. beacuse I'm asking this regarding, I have kept a filters that even if we want to see some months or a particular months or perticalar span of months... there on Xaxis it need to change the months dynamically depending on the filters..... (for ex, on Xaxis the values should be (Jan, Apr, Jun,Oct) if i select the 3 months period filter....)
I have written a logic to collect the values of those particular months into an array, but not understading how to pass this array to Bar chart,, beacuse there I don't know what Xfield and Yfield to be given....
ListCollectionView is often promoted as a great way to daisy-chain different views of the same data. You have some source collection and then use ListCollectionView + filterFunction to wrap the source data and present a subset of that source collection. When the source collection changes (either adds or removals), the chained LCV gets updated automatically. However, if the filterFunction for the source collection changes, it does not appear to propagate to the chained LCV:
[Code]...
At this point, I would expect justMatts to receive a CollectionChangeEvent and rerun its filter. Since all Matts have been filtered out of the source object, justMatts would be empty as well. However if you look in ListCollectionView code, they don't handle a CollectionEventKind.REFRESH which is what gets fired when source gets a new filter applied. Am I doing something wrong here (using wrong class, etc) or does nothing in Flex support the changes to source filter.
I can get this working as I expect it to by manually dispatching a CollectionEventKind.RESET on source, but I was hoping to not have to subclass anything.
I am trying to figure out how to open a pop up window in my Air application, in a secondary Window, instead of the main application window.I am using the ReusableFX components, which include a custom DataGrid with filtering and other capabilities. The filtering feature displays a pop up window via PopUpManager when you click on the top of a column in the grid.
PopUpManager.addPopUp(this, FlexGlobals.topLevelApplication as DisplayObject);
The problem is that the pop up window opens in the main application - I am assuming because of the 'topLevelApplication' reference.So, I need a way to open this window in the current Air "s:Window". I am assuming I need a way to walk up : this.parent.parent or this.owner.owner - though I have tried that and it did not seem to work (it said null reference).OR, is there a way to get the current top most window / component (NOT the main application / window)?
Update:I decided to create a new project for the component, and add in the Air libraries. Now I am able to access the "NativeApplication.nativeApplication.activeWindow" call. That gives me the correct Air window. However, it does not seem to be working:
PopUpManager.addPopUp(this, NativeApplication.nativeApplication.activeWindow as DisplayObject);
My popup does not appear. I am assuming because "activeWindow" is not actually a DisplayObject?(so how do I get the DisplayObject if that's the case?)
In my flex application im using two datagridfirst datgrid is for items collectionssecond is for bank details.if i click one row in first datagrid (which has the items collections)...a unique code is taken from the grid(which is primary key).then, i have to select two or more banks using itemrenderer checkboxes in second datagrid(which has the bank details)ow, have to bind the bank details(one or more banks) with that one primary key in first datagrid. to an single array collection... and have to show it in another new datagrid(thirdone)
View 1 RepliesI have an array, crewPositionsAC that contains a list of position abreviatations - EP, PR, DR, WR, and so on. These positions are read in through an XML file each time my flex application loads. Also being populated from an XML is a project. Within a project, there are positions (a student assigned to a type of position listed within crewPositionsAC). These positions are not necessarily in the correct hierarchy order dictated by crewPositionsAC. I have all the positions within an ArrayCollection (positionsAC) with the following structure:
positionsAC (arrayCollection)
[0] = Array
[0] = startOffset
[1] = numDays
[code].....
Then, the user can click a button to add another position. When the "Add Crew Member" button is pressed, the user is presented with a list of possible positions to add. Currently, I simply add another array to positionsAC. This results in the recently added crew member to placed on the bottom of the list. I need to take positionsAC and reorder it based on it's [2] item (role) based on the hierarchy defined in the crewPositionsAC. crewPositionsAC has the following structure:
crewPositionsAC:
[0] = EP
[1] = PR
[2] = DR
[3] = WR
* continue until all possible position types are listed
I have an array collection of strings and integers (which I have displayed in a data grid) and I am wondering if it is possible to export the array collection into an html table? or even a text file for the user to download
I found some pages that had an export to .xls files but I want to stray away from that for now.
While making my choice b/n Array and Arraycollection I get confused why whould I use one and why not another. I have read the theory in langref but apart from that is there some general advantages/disadvantages of one over the another that you have learned from your experience.
View 4 Repliesi have created one array collection in flex.and i have my one XML file. Now i want to call that XML file into arraycollection
View 2 RepliesIm trying to populate a tree control with an external xml file brought in via arraycollection but i need to group the xml data to display in the tree Okay my external xml file is called parts.xml and it looks like this:
[Code]...
additionally what i intend is for the user to have huge tree of parts and they select a node at the partnumber level and drag an drop it on to a datagrid where all the other tags of the part gets displayed.
Ive tried and tried many things without any luck. even now im thinking maybe if i looped through the array-collection and created a new array just for the tree to get it to display the way i need it, then when the user dragged and drop a part onto the grid i would have code that would look for that part number in the original arraycollection and add it to a new array just for the datagrid... i still dont know how i would create that new array for the tree!! cause the xml data is grouped by partgroup and then grouped again by parttype before you get the individual part numbers
I have an array collection that I would like to limit to say 100 items. I tried setting up a filter function where the return was:return (myAC.getItemIndex(item) > 100);but the value was always -1. For whatever reason it couldn't find the item, even though the item is definitely there.I'm able to do this with a while loop:while(myAC.length > 100) myAC.removeItemAt(100);
View 4 RepliesI have two xml files, defect. xml and employee.xml. But the files havea common field but with different names in each file. I want both the files to be merged in to a single array collection.
The structure of my defect.xml file is:
<defectList>
<defect>
<revId>123</revId>
[Code]....
Now, if I give datafield as "employeeId" in the datagrid with defectList as dataprovider, I get the employee id of the corresponding Employee Name.
I've got an XML Doc loaded in. I've created an Horizontal List and referenced the arraycollection as the Data Provider. But what I need to do now is then pull the data out from that. I have 3 nodes / variables. They are id, title, thumbnail. But when I go to pull through the data as : {videos.title} Flex Builder gives me the Error - "Access of undefined property videos". Now I know full well it exists, as when I set the dataProvider to {videos} it pulls through the data without issue.
My code is as follows :
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="800" minHeight="600"
[Code] .....
How do I go about getting the XML Node : title and of course the thumbnail too?
Does flex allow empty, or missing, keys within an array collection? For example, would the following code be okay:
var myAC:ArrayCollection = new ArrayCollection;
myAC.addItemAt("hi", 0);
myAC.addItemAt("hola", 4);
[code]......
I have an array collection set as a datagrid's dataprovider. I'm pulling content from my relational database and 2 of the columns in the grid appear as foreign keys.
How do I go about replacing the foreign key id with information from the other table?
I'm guessing I need to do some sort of: for each, but I'm really not sure how.
I want to sort an array collection in a way that I am not sure is possible.Usually when you want to sort you have something like this.[code]if a is the same in multiple classes then I want to sort on ToSortInner2.aa Is this possible. I have tried to pass in inner1.aa as the sort field name but this does not work.
View 2 Replies[Code]...
I'm not getting like this ...how can I get groupId (exact id which I'm getting into arraycollection thru remoteobject) of selected GroupName?
In ActionScript I have string as
str="subject,r1,r2:a,b:1,2:3,4";
Dynamically I have split this string and build array collection as given below
arraycoll.addItem({subject:a ,r1:1,r2:3});
This example of one set. The array collection should be built dynamic. I have tried but not successful.
I was wondering what's the difference between doing [code]However type 2 seems to work, but more people seem to reference type 1
View 1 RepliesI'm using zend_amf and flex. My problem is i have to populate my advance datagrid using array collection. this array collection have a children.[code]...
View 1 RepliesI want to give an array index to array collection let say 205 when it is started is it possible to do so in flex or any alternate of this.actually I need to index the objects with a specific no, in 2D array collection
say
205 a c d g f d
268 s g h g f f
805 d g h h f f d
where integers are indexes and alphabets are object referenced by these integers
Is it possible to pass an ArrayCollection object from flex ExternalInterface.call() as a parameter to javascript function?
[Code]...
I am trying display values in a datagrid in my application. I have all the values as an xml file. I had only one set of record n the XML file, to fill only one row of the data grid. While trying to store the values from the XML file to an Array Collection in the application File using the code, i.e.,
<mx:Model id="reviewList" source="assets/reviewList.xml"/>
<mx:ArrayCollection id="reviewlist" source="{reviewList.Item}"/>
I get an error, saying Error No# 1034: Type coercion failed cannot convert mx.utils::ObjectProxy to Array.But If I have two record sets in the XML file, it works fine. If there is only one set, I gHere is my xml file:
<ReviewList>
<Item>
<ReviewId>1123</ReviewId>
[code]....
I have an editable column in a datagrid. How do i copy the contents of that column into an array? The dataprovider for the datagrid is an array
View 3 RepliesHow to filter an Arraycollection by "array of values" rather than a single value (simple comparision) , the below code snippet is for filtering by single value now I went into scenario like filter out only price [10,4,1,8] (some random values from the master collection). Is there any better way to do the second code snippet
[Code]...
One point I haven't mentioned is my items in the filterBy array are custom data not the basic datatypes.
I have an array collection as the dataprovider to a datagrid. When I change a value in the arraycollection, a particular row gets updated in the datagrid. I want to get the index of that particular row. How do I get it?
View 1 RepliesIn a datechooser component i want to get the all date values of a particular column in a month eg: All date values that occur in saturday in an array.
View 2 RepliesI have an arrayCollection with the following structure:
[Code]...
the AC is defined as follows:[Bindable] private var projectErrorsAC:ArrayCollection = new ArrayCollection;
I'm using this AC in a repeater to display each error. After each error is shown, I've placed an "Accept" and "Deny" button. Once the user clicks either one of these buttons, I'd like to call a function that removes the particular error from the AC. Here's what I have so far:
[Code]...
I have a Flex 4, mx:DataGrid with the following (pertinent) properties set:
width="100%"horizontalScrollPolicy="off"
I have the minWidth set on all of the DataGridColumns and the width set on one of them. If I simply maximize/minimize the display (in browser or stand-alone flash player) of the application, the columns scale up and down nicely. But if you grab the edge of the application and drag it to make it bigger, only one column grows really big. When you drag the size down again, the one column remains big, but all of the other columns get squished way down.
I want to know column index of header in AdvancedDataGrid when a user clicks on header - either left click or right click.
View 1 Replies