Flex :: Selecting One Particular Data Item?

Jul 9, 2010

I've created an Flex app. It currently has an drop down menu. With the option to select a Channel. Once the channel is selected the data pulls through. But, what I want to do is just pull through one channel of data as opposed to multiple items of data. How can I achieve this?

My code is quite simple at the moment and looks like this :

<mx:FormItem label="Select your Channel : " x="296" y="0">
<s:DropDownList id="channelSelection"
dataProvider="{channelList.lastResult.channels.channel}"

[Code].....

View 1 Replies


Similar Posts:


Flex :: Selecting One Particular Data Item From XML

Jul 12, 2010

I've followed the Flex in a week example, with the drop down menu that pairs the XML data to the XML node set.For the project I am creating, I am just pulling through ONE XML file containing just one node into my application.I am using HTTPService and pulling the data through, but at present the only way for this to work is by using the <s:DropDownList>[code]

View 1 Replies

ActionScript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item. list is called "tidlist" function is "selecttid(n)" the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select one (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

Actionscript 2.0 :: Select An Item From List Component And Fire A Function Directly Related To Selecting That Item?

Jul 13, 2009

I want to be able to select an item from my list component and fire a function directly related to selecting that item.

list is called "tidlist"
function is "selecttid(n)"

the "n" needs to be replaced with the index number... so if run my swf and the list component displays my items... when i select an item (the third one for example)... i want to fire "selectTid(3)".... cant seem to grasp.

View 1 Replies

Flex :: Datagrid - Selecting A Checkbox And Deleting A Data Grid Row?

Jul 3, 2009

I am trying to implement the following :

1> First column of datagrid has a checkbox.
2> Select checkboxes, and then delete the datagrid column.
3> Dynamically, add checkbox when row is added dynamically.
4> Do not show check box if now data in row.

View 4 Replies

Flex :: Triggering Function Event On Selecting A Row In An Advanced Data Grid

Feb 22, 2011

The Following code seems to only be working when i have editable="true" on the Advanced Data Grid. But I don't want it it be editable.

The docs don't say anything about it needing to be editable, and i dont see why it should need to be.

[URL]

a_data_list.addEventListener(AdvancedDataGridEvent.ITEM_FOCUS_IN, clickedRow);
public function clickedRow(event:AdvancedDataGridEvent):void
{
trace("datagrid line was clicked");
}

View 2 Replies

ActionScript 3.0 :: Selecting An Item On The Stage?

Jan 13, 2011

Im going to have multiple items in this game im making, and i want these items to be selectable. And i would have to be able to trace which was was currently selected.

View 1 Replies

ActionScript 3.0 :: Selecting First Item From Listcomponent

Aug 18, 2009

I've written the following code to load images in a datagridcomponent by using a listcomponent. What code do i use to automatically select the first item.[code]

View 2 Replies

Flex :: Using An Image Item Render In A Data Grid

Jul 7, 2010

I'm attempting to add an image to a datagrid item render dynamically in flex. Here is my DataGrid code The value of "str" in the getImagePath function is correct.

[Code]....

View 1 Replies

Flex :: Inline Item Editor Wiping Out Data?

Jan 16, 2011

In this app that has an inline item editor, if you click on a location cell then press tab, the value in the location cell is wiped out.

focusOut doesn't work, nor could I get this to work in DataGrid itemEditEnding etc.

See this Flex forums post, because posting code here rots:[URL]

View 1 Replies

Flex :: Cant Edit Item In Datagrid With Override Set Data Method?

Mar 12, 2010

I've a custom itemRenderer for my datagrid. To set the actual data I use the following method:

override public function set data(side:Object):void{
...
}

As soon as I use this function the cell doesn't show up any item Editor anymore. Why is that? When I remove this function the itemEditor is working but with the wrong initialization data.

View 3 Replies

Flex :: Datagrid, Select An Item Given My Data Attribute Values?

May 6, 2010

I'm using a custom component CheckBoxList DataGrid (http://blogs.adobe.com/aharui/2008/02/checkbox_selection_in_datagrid.html) and as dataProvider I have an ArrayCollection with items such this one:

name="item name" selected="true"

I would like the CheckBox list updated when the selected attribute is set to false or true in the data model.

View 1 Replies

Flash - Check To See If An Item Already Exists In Data Provider In Flex 4?

Mar 9, 2011

I have a dataProvider and there is an object in the dataProvider. I want to know if there is a way to see if you can check to see if part of the object exists. So lets say I have an object with usernames and passwords and I want to add a username to that dataProvider

View 1 Replies

Flex :: Displaying An Item Rendered Balloon Above The Data Point

Aug 11, 2011

I'm using a custom item renderer for an AreaChart:

[Code]....

I'm displaying my text. However, I want the balloon to be exactly above the data point. I tried to change the (x,y) coordinates but it doesn't seem to change. How can I move this balloon around to a desired location?

View 2 Replies

ActionScript 3.0 :: Selecting Right Data From XML

Sep 13, 2010

I'm trying to create an gallery application that reads the pics from the server per category (= directory). I do this using a PHP that creates the XML file:

HTML-code:
<?xml version="1.0" encoding="utf-8" ?> - <categories> - <category name="Categorie1">
<image name="cat1Pic1.jpg" /> <image name="cat1Pic2.jpg" /> </category> - <category name="Categorie2">
<image name="cat2Pic1.jpg" /> <image name="cat2Pic2.jpg" /> <image name="cat2Pic3.jpg" /> <image name="cat2Pic4.jpg" /> </category></categories>

Now I can get to the categories(= directories) using this code:
ActionScript 3 Code:
var categoryAttributes:XMLList = galleryInput.category.attributes();
for each (var categoryNAME:XML in categoryAttributes){
trace("categoryNAME:" + categoryNAME);
}

This works, I get the directory names and create labels on stage and hang eventlisteners on them to handle user input. The next step is to select the corresponding pictures (that are in the "current" directory) and I just can't get it to work. My best effort so far is the following, but this code gives me ALL pictures, not a selection....

ActionScript 3 Code:
var categoryAttributes:XMLList = galleryInput.category.attributes();
for each (var categoryNAME:XML in categoryAttributes) {
trace("Hier komt de categoryNAME:" + categoryNAME);
// Get the right pictures
[Code] .....

And if I use galleryInput.category.image.name AS3 states that there are more than one value (of course). Now I have 2 questions: How do I limit the selection to just the images belonging to the "current" category? Is this the right approach? Or should I design it all different?

View 1 Replies

Flex :: Get The Item Parent In A Tree When Using Nested Objects As Data Provider?

Jan 11, 2010

I have a Flex tree with an ArrayCollection as data provider. The collection holds an array of CategoryVO objects. Each object can have another array of CategoryVO objects inside it's "child" attribute. This way the tree displays the data correctly. Now I want to get the parent of a specific item, e.g. tree.selectedItem. Using XML as data provider the item parent is avaiable thorugh the parent() method. But I can't convert my data to XML. How can I get an item's parent? Perphaps using the tree's dataDescriptor?

View 2 Replies

Actionscript 3 :: Implement An Object Pool For Flex Data/Item Renderers

Oct 6, 2010

You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool?

I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to that. For example, when an itemRendererFunction has been assigned to a data group with a virtualized layout, item renderer construction is indeed deferred, but the instances are not re-used - I'd like to be able to intervene there, if possible.

But even in the case of normal virtualized renderers (where the instances are re-cycled) it would still be useful to be able to manage the pool manually. Pools could be shared between data groups, for example, to reduce the initial buffer required to populate each group.

Is there any way to know when Flex discards an item renderer instance? I have a sinking feeling that there is just no reliable way to tell - even though perhaps there should be.

View 2 Replies

Actionscript 3 :: Flex - Simulating A Click On A Button Inside An Item Renderer Of A Data Grid?

Sep 20, 2010

I'm using a data grid with an item renderer that creates a toggle button. The idea is to have a list of items and only allow one to be selected and pre-select one at start.I've got the single button selection working, meaning that when I click on on toggle button, the others are deselected.My problem is to create a way of pre-selecting an element of the data grid or simulate a click on a row and selecting the corresponding toggle button.If I use the datagrid.selectedIndex the result is a selection but the toggle button doesn't get selected.Here is the code exampleIn this example I am using the array value "selected" to define selected button, not my favourite solution but the one that worked first.The array collection:

public static const ValuesList : ArrayCollection = new ArrayCollection(
[
{ID:0, Name:"One", selected:false},

[code].....

View 2 Replies

ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies

Flex :: Select Item In Details Form Dropdown When Datagrid Item Is Selected

Feb 15, 2011

I have this datagrid:

<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>

[Code]....

What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).

View 1 Replies

Flex :: Get List Item Selection Working When Using A Png Mask In An Item Renderer In A 4.5 Mobile App?

Jun 10, 2011

I'm creating a mobile app in which I need to show a calendar with months at the top. The months are part of a component that extends from SkinnableDataContainer (and has some custom scrolling/behaviour - which is why I did'nt use a spark list). I need the months to be shown as a 'trapezium' shaped tab and so I'm using a png image as a mask in the item renderer for the component.

When the mask is not applied, it all works well - the months render, the list/data container selection works when I click on a month and so on.When the mask is applied, it renders well, scrolling and everything else seems to work well - but when I click on a month, nothing happens visually. And from the trace statements in my code, it appears list item selection is not changing. Looks like mouse clicks are not working.

Code:

public class TopCalendarMonthRenderer extends LabelItemRenderer {
[Embed(source="/assets/trapezium_alpha.png")]
private static var TrapeziumMask:Class;
private static var trapeziumMaskInstance:BitmapAsset;

[code]...

View 1 Replies

Flash :: Flex Data Grid: Check Whether Item Renderer Displays Last Row In Grid

Feb 3, 2012

I'm currently working with the OLAPDataGrid component and got stuck at a relatively simple task: I want to style the last row of the grid differently from the rest, so my cell item renderer needs to know whether he's rendering the last row with content in the overall grid, including those rows currently not rendered because they are outside the visible grid space. AdvancedGridListData's rowIndex property only gets me the row index of the renderer relative to the range of visible grid rows, i.e. when I scroll down the grid, a data item with an index greater than 0 gets the rpw index = 0.

View 2 Replies

Flex :: Access TileList Item Index In A Custom Item Renderer?

Mar 4, 2011

<mx:itemRenderer>
<mx:Component>
<mx:Canvas>

[code]......

View 2 Replies

Flex :: Toggling States - When Other Item Is Selected The First Item Does Not Change Its State?

Apr 26, 2011

I have used states in my application.The thing is I have made the first item in my list to be selected. so I gave like this,

if(itemIndex == 0)
this.currentState="selected";

this works fine.The problem is when other item is selected the first item does not change its state,it remains in the selected state until its clicked.My code looks like this,

<s:BorderContainer id="outerCont" width="275" height="100" borderVisible="false"
backgroundColor.normal="#3D3C3C" backgroundAlpha.selected="0.1"
backgroundColor.selected="{data.color}">

My states are like this,

<s:states>
<s:State name="normal" />
<s:State name="hovered" />[code]........

View 1 Replies

Actionscript 3 :: Add A Spesific Data Item To A Data Grid?

Jun 22, 2010

I have a Data Grid with automacticly genorated columns, i now need to add data items into a spesific row / column of this grid e.g. col 2 row 3. It dosnt have a data provider at the moment as i wish to be very selective about which data goes where.

View 1 Replies

Actionscript 3 :: Trigger Flex Piechart Item Click Event When A Datagrid Item Is Clicked?

Nov 4, 2011

Is it possible to trigger Flex Piechart Item click event when a Datagrid Item is clicked.If so can anyone give some example.

View 3 Replies

Flex :: Upload - Adobe Flex Mobile Selecting Image From Camera Roll Or Taking Picture Restarts The Application

Jan 19, 2012

I have a flex mobile application that I am working on that I am having issues with selecting an image from roll/taking a picture. My application is not tabbed, however one part of it contains a Tabbed View Navigator with tabs across the bottom. Within one of those tabs, I have the ability to upload an image to a webservice that I have created. However, when I select an image or take the picture, it pops back out to the initial splash screen and the application restarts. If I use the component standalone (outside of the tabbed view navigator) it selects the image and uploads without any problem.

[Code]...

View 1 Replies

Flex :: Selecting Id Of TextArea (despite RichEditableText)

Jun 17, 2010

I'm trying to select the id of a textArea when it's focused in

[Code]...

Problem is TextArea is made up of RichEditableText so target doesn't actually refer to TextArea. I've tried event.target.parent.id but still not getting there. Anyone knows how to get to the bottom of this?

View 2 Replies

Flex :: ArrayCollection - Selecting Value From ComboBox

Sep 22, 2010

My goal is to create a generic function that selects a value in a combobox according to a value. (My comoBox holds arrayCollection as dataProvider.) The difficulty is infact to get a propertyname in runtime mode.

public function selectComboByLabel(combo:ComboBox , propetryName:String, value:String):void {
var dp:ArrayCollection = combo.dataProvider as ArrayCollection;
for (var i:int=0;i<dp.length;i++) {
if (dp.getItemAt(i).propertyName==value) {
combo.selectedIndex = i;
return;
}}}

The line if (dp.getItemAt(i).propertyName==value) is of course incorrect.
It should be arther something like: dp.getItemAt(i).getPropertyByName(propertyName)

View 2 Replies

ActionScript 2.0 :: Putting Data Into An Array Via XML And Then Selecting At Random An Image String To Load In A Pic At Random

Feb 11, 2009

I've been putting data into an array via XML, and then selecting at random an image string to load in a pic at random. But whilst doing this, I wanted to remove the String from the Array that I have just used, so I don't get repetition of the same image in the output. I initially thought that pop would remove the string I had just used - But of course it Removes the last value in the Array instead, which doesn't really help.

Ok - so how about randomizing the data once inside the Array, after it has been pulled in from XML!? That way I can load in the 'last' image, and then pop it out! Keeping a randomized selection of images each time 'it' is loaded

View 2 Replies







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