Flex :: EventListener To Watch For Number Of Items In DataGrid?

Oct 1, 2009

Indeed the best for fast building of Web based Apps...

I'm trying to do something with eventListeners, but i still do a lot of messy code, so wanted help of those who already know flex.

I'm have a DataGrid, and its itens are added by another component, no problems with that.

I have buttons to Add, Remove and Edit the items inside the DataGrid. No problem with that too.

But i want those button to be enabled when the DataGrid as at least one item, and when it doesn't as any, all three buttons should be disabled.

EDIT: Forgot to say: I think eventListeners are the best way.

View 1 Replies


Similar Posts:


Flex :: Get Number Of Items In Datagrid

Jul 26, 2010

I am using Datagrid control in flex.I need to get the count of number of items in that Datagrid. What is the method to get that?

View 1 Replies

Flex :: Display Number Of Items In A Grouping For Advanced Datagrid

Oct 19, 2011

I have my ADG displaying data like this:

[Code]...

View 1 Replies

Flex :: Group Items In DataGrid?

Aug 12, 2009

I have a DataGrid with info like this:

Associate AmountTimeCustomer
John Doe 29amSam Smith
John Doe 210amBerry Cooper
Bill Ace 19amSandy James

Repeating the name and amount gets redundant so I would like it to look something like this:

Associate Amount
John Doe 2
Bill Ace 1

Then when you select one, it expands to show the times and customers for the selected associate. I hope this makes sense...I am currently just using a DataGrid but I can use an AdvancedDataGrid if thats needed...I am pretty sure something like this can be done, I just don't know how.My data is in xml and looks like this:

<stat associate="John Doe" date="08/12/09" amount="2" time="9 am" customer="Sam Smith"/>
<stat associate="John Doe" date="08/12/09" amount="2" time="10 am" customer="Berry Cooper"/>
<stat associate="Bill Ace" date="08/12/09" amount="1" time="9 am" customer="Sandy James"/>

View 1 Replies

Flex :: Datagrid Select All Items?

Aug 9, 2010

What would be the best way to select all items in a datagrid.

I was thinking of doing a for loop and then select each item, but is there a better way for achieving this?

View 3 Replies

Flex :: Sort Items In The Datagrid Alphabetically By Name?

Nov 13, 2010

I want to sort items in the datagrid alphabetically by name.The order should be:

1) The name should first check for upeercase of the name if it is not then it should look for lowercase for the same letter alphabetically.

For example : if i have array of items say{Apple,boy,ant,Bat) then after sorting the list shld be

Apple
ant
Bat
boy

View 2 Replies

Flex :: Select Multiple Items In A DataGrid?

Feb 28, 2011

how to multiple select the datagrid? i can't figure it out.

View 1 Replies

Xml :: Flex - Display A List Of Items In A Datagrid From A XMLList?

Oct 19, 2009

I am trying to display a list of items in a datagrid from a XMLList.

<Series no="1">
<file>
<filenum>1</epnum>
<prodnum>4V01</prodnum>

[code]...

My current code allows me to retrieve every Series into an XMLList and then i have a nesteddatagrid class that allows me to do things like.

<classes:NestedDataGrid width="100%" height="100%" id="gridFiles" dataProvider="{filesList}" >
<classes:columns>
<mx:DataGridColumn headerText="Season" dataField="@no" width="60"/>

[code]...

However this displays the datagrid with two rows, the first row has 1 in the Series column and then the two files crammed into the second cell in the same row. The second row is the same but has the number 2 in the Series column and the two series #2 files crammed into the cell next to it.If i do not use the nested data class i can pull the files using Series.file instead and all 4 of the files list correctly, however i do not get the Series number for each...

View 1 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

Flex :: Number Of Items In A Combobox?

Apr 15, 2010

How do i retreive the total number of items (count) of a combo box in Flex?

View 4 Replies

Flex :: Popup Editor For Datagrid Items - Hangs The Browser

Sep 9, 2010

a datagrid which renders some items. clicking on an item would bring up a popup editor (as the item has lots of properties and may not be edited right in the datagrid).

the popup contains just a form and a [Bindable] reference to the item it edits (which is passed from itemClick handler of the datagrid). form's default values are taken by binding to corresponding item properties with {} notion, while form values are bound back to the item using mx:Binding tags.

and now the problem. when the popup is brought up for the first time, everything is fine. however, when after being closed the popup is brought up again by clicking on the same item, the browser hangs (afaik because of change watchers being endlessly fired resulting in stackoverflow or something similar).

we have same behaviour in Safari, IE and Chrome, so i guess it's not to do with something browser-related. removing either [Bindable] from the item reference in the popup or mx:Binding tags from editors suppresses the problem, but of course the editing no longer works.

here's the code of the popup:

<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Details"
showCloseButton="true" close="PopUpManager.removePopUp(this);" creationComplete="PopUpManager.centerPopUp(this)">
<mx:Script>

[Code]....

View 2 Replies

Flex :: Get The DataGrid To Re-render The Visible Items So That The LabelFunction Will Be Run Again To Get The New Data?

Mar 30, 2011

I have a DataGrid where some number of the columns can have a labelFunction. The nature of the labelFunction result can change problematically(eg apply formatting,bypass formatting. How do I get the DataGrid to re-render the visible items so that the labelFunction will be run again to get the new data.I've tried the invalidateDisplayList, validateNow, and tried dispatching ResizeEvents on the DataGrid.

View 1 Replies

Flex :: HTTPService Result - Checking Number Of Items With A Specified Name

Nov 12, 2009

I have a question about HTTPService and the data it returns.

Well lets consider this XML:

<PhotoGalleryData>
<Photo>
<id>1</id>

[Code]....

View 2 Replies

Flex :: Limit The Number Of Items In The Repeater Object?

May 19, 2010

I'm using a Repeater object in Flex. Would be possible to stop the repeater after 50 iterations.. even if my dataProvider is bigger ?

I want to display only the first 50 items. I'm using MXML to implement the repeater.

View 1 Replies

Flex :: Generate Serial Number Using LabelFunction In Datagrid?

May 4, 2011

how to generate serial number using labelFunction in datagrid?

View 4 Replies

Flex :: DataGrid Reads A Field From LastResult.node As Number?

Sep 7, 2009

Why does Flex 3 DataGrid read a string from XML lastResult.node as number?A field is saved as var_char in mysql, php reads it as string and pass it OK.If there are more then 16 charaters it gets rounded....For example:

this in database cell:

12345678901234567

gets read in DataGrid as nubmer as 12345678901234568

this is in database cell:

5555544444222223333377777

php reads it same and puts it in XML flex reads XML into arrayCollection and DataGrid reads it as:

5.55554444422222e+24

So it reads it as number, why? And how to make it read as String? I tried with labelFunction, no help.

View 3 Replies

Actionscript 3 :: Insert A Line After A Certain Number Of Rows In Datagrid In Flex?

Feb 16, 2011

Is there a way to insert a horizontal line after a certain number of rows, which may be variable depending upon a property in data provider of a datagrid?

View 2 Replies

Flex :: Actionscript 3 - Populating A Datagrid With Variable Number Of Columns And Rows

May 17, 2010

I am trying to figure out how to manage a Datagrid based on an XML object like this:

[Code]...

I will need to populate the Datagrid column names based on a different XML object and use the above XML to populate each of the column's rows. I currently am able to create the Datagrid and populate its column headers but I am unsure as to how to how to add the rows for each column. The above XML will be update with new row and column elements added and deleted. This, of course, will be bound to the Datagrid to show updates.

View 2 Replies

Flash :: Flex Datagrid And Finding Number Member Variable Of A Class

Mar 1, 2011

How to populate a flex datagrid from an Arraycollection without specifying DataGridColumn's individually. Is there any custom datagrid available where I can pass the datasource arraycollection and see the data populated in the output. Without knowing the structure / bluprint of an object is there anyway to find how many member variable that class have?

View 2 Replies

ActionScript 3.0 :: EventListener For Frame Number?

Mar 15, 2010

I am making a website, I have a loaded swf that I want to animate off screen AND THEN unload on a button click, the home button in this case. I have had a shot at making this happen but to no avail.This is the code I have, which currently doesn't work. The function 'frame30' does not fire. I have annotated it so you can see what works and what doesnt.[code]

View 1 Replies

ActionScript 3.0 :: EventListener For Var Number Change?

Jun 1, 2010

I have 3 buttons that increase/decrease the var 'StressPercent' and this in turn shows the new number in a 'Stresslevelbox' text box. How do I now add an EventListener for when the 'StressPercent' var changes?

Code:
var StressLevelbox:TextField = new TextField();
StressLevelbox.text = "Stress";
StressLevelbox.x = 10;

[Code]....

View 2 Replies

Generate Serial Number For Datagrid According To The Number Of Rows?

May 4, 2011

how to genrate serial number for datagrid according to the number of rows?

View 1 Replies

ActionScript 3.0 :: Load SPECIFIC XML Items To Datagrid?

Jun 21, 2010

how to Load SPECIFIC XML items to datagrid?

View 1 Replies

ActionScript 2.0 :: Access DataGrid Column Items ?

Nov 3, 2006

I was wondering if anyone knew how to access column items...

ie if i made a column named "Info" and wanted to get the 5th item how would i go by doing so.. i though it was just an array something like this my_dg[Info][i] were i is the index counter.. but that wasn't it.. i can get it to display the column name but thats about[code]...

View 1 Replies

Actionscript 3 :: Selecting Flex Chart Items And Displaying Sum Of Items Selected

Aug 26, 2009

I would like to use the selectionMode=multiple described in the Flex docs, but with a few modifications:

1) I would like the box that the user drags over the graph to remain there until the user drags a new one.

2) In the top right corner of the box I want to display the sum of the items selected by that box.

View 1 Replies

Flex :: Make List Items As Tool Tips For Combo Box Items?

Dec 1, 2009

How to make list items as tool tips for combo box items?

View 2 Replies

Flex :: Force The List To Load All The Items, Not Only The Visible Items?

Aug 15, 2010

I'm creating a facebook application in flex. I'm actually working on the friends component that shows your friends who are using the application. now, each friend has a profile image.

I created the component using a s:List element.

In the Skin Class of the element i configured the requestedColumnCount to 3, which means it shows 3 friends. i added buttons to scroll left and right in the list.

Whenever I scroll to see a different friend, for a half of a second i see no image because the List component is loading the image in order to view it.

is there a way to make the list preload all the elements so i won't have this kind of problem ?

View 1 Replies

ActionScript 3.0 :: Force DataGrid Sort (Alphabetize After Adding Items)

Dec 8, 2008

I have a DataGrid set up and have the XML data nice and cozy inside of it, but I have a bit of a snag. The data I'm importing comes from a few separate files but the DataGrid ends up displaying all of them, so the rows are a bit of a jumble initially. Is there a way to tell the DataGrid, AFTER it has all of it's data, to sort itself out alphabetically based on it's first column?

View 3 Replies

ActionScript 2.0 :: Number Of Items Inside Array

Jun 30, 2011

I have an Array where in position 0, there are two items "name1" and "name2", then in position 1, there is only 1 item "name3", and position 2 there is only 1 item "name4".

Now when I trace like this:
trace(exampleArray[0].length)
The result is 2;
But when I trace like this:
trace(exampleArray[1].length)
The result is 5;

I understand that on the second trace its counting the length of the item so its the number of letters that its returning. I'm just wondering how can I get it to return 1, which is the number of items in that position which is what I'm interested in.

View 5 Replies

Actionscript 2.0 :: Get The Number Of Items With A Certain Attribute In A Xml File?

Sep 16, 2009

I'm trying to get the number of items with a certain attribute in a xml file....for example, i want to find out how many "thumbs" there are with an attribute of "websites"

var items = web_xml.firstChild.firstChild.childNodes;
var numOfItems = items.length;

The above gets me the TOTAL number of items in the WHOLE list (numOfItems) so i'm guessing i need something like:

var webItems = items.attributes.type == "websites";
var numOfWebItems = webItems.length;

but that doesn't work...

Here's the xml file:

<menu>
<thumbnails>
<thumb type="websites">

[code]...

View 7 Replies







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