Flex :: Set SelectedItem In DropDownList?

Sep 10, 2011

I am making some simple project and I have problem with selectedItem. I have sth like this

<s:State name="Form" enterState="makesService.send()"/>

so when I enter this state I take makes from database and populate them to dropdownlist.

but I have also button and on click event I'm changing state to this Form and I want to select specific make from the dropdownlist but I can't. I'm not sure whether I'm doing sth wrong or the problem is that I'm selecting item just before the dropdownlist became populated.

e.x. List of make consist of Audi and BMW and when I click button I want to open this state Form in which this dropdownlist exist with selected value e.x. BMW.

View 1 Replies


Similar Posts:


Flex :: Spark DropDownList SelectedItem Didn't Update After DataProvider Changed?

Dec 26, 2010

I have two dataProvider's for one DropDownList. The following code can be compiled and run.

<?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].....

View 1 Replies

Flex :: How To Set 'selectedItem' Property

Oct 15, 2009

i am working in Air application in Flex3 , i need know how to set "selectedItem" Property when we have 2 values like(data and label) label property to combobox selection, data value for our input.In (selectedItem="{stylename}") stylename will have "data" value but i need to set that "lable" property as selected value in combobox.Like if stylename is "checked" then the ComboBox selected item need to be "Checked".How to implement this in flex.

View 1 Replies

Flex :: Identify The Component's SelectedItem

Mar 17, 2010

I am creating a lot of dynamic flex components like RadioButton, Combo Box, CheckBox.

[Code]....

When i click on Submit finally i need to get all the selected Values in each question. All the components are dynamically created at runtime.

View 1 Replies

Flex :: Reflect Changes In The List.selectedItem In The ItemRenderer?

Oct 22, 2010

When I change the: list.selectedItem.name = 'name2'

then in my item renderer

the dataChange event is not fired! and I can't update the label with the name property...

View 2 Replies

Flex :: Get SelectedItem Data Value From Treeview In Actionscript?

Jan 26, 2011

Main Thread (Suspended: ReferenceError: Error #1081: Property @data not found on Object and there is no default value.) [code]...

View 1 Replies

Flex :: Using List SelectedItem It Appears As Null?

Feb 15, 2011

I have encountered somthing a little strange in flex, possibly somthing im doing wrong but im not sure. In two cases which i have noticed, when there is only 1 item in a s:List or s:DropDownList for some reason when using list.selectedItem it appears as null. Using requireSelection="true"i know this isnt the case.

[code]...

View 1 Replies

Flex :: Get Global Y Coordinate Of Datagrid Selecteditem?

Aug 5, 2011

Here's the situation: I have a populated datagrid and I want to move a form to be inline (same y position) with the datagrid's selectedItem. I cannot rely on a mouseClick event because the selected item may change with a keyboard event. The datagrid does not have an itemRenderer, just plain old dataField.Anyone done this before?

Here's some stubbed out example code for all those interested based on Jacob's answer.

[Code]...

View 3 Replies

Flex :: Display A DataGrid SelectedItem's Details In A Form?

Oct 18, 2009

I used HTTPService POST method to call a php file that returns me an xml type of result like

<user>
<name>jones</name>
<age>34</age>
</user>

This result is obtained after the php files queries a database. The database contain other information too like (height, gender, education and address)Now i have a DataGrid (having two columns: NAME and AGE) and a Form below the DataGrid. I have displayed the above mentioned xml data in the DataGrid using the dataprovider="{userRequest.lastResult.User}" attribute.

I now want to use the itemclick=itemClickEvent(event) so that when a user click on a row of the DataGrid other information related to the clicked row like (height, gender, education etc) may appear in the form which is placed below the DataGrid in the GUI. For now my itemClickEvent, look like:

private function itemClickEvent(event:ListEvent):void
{
clickRow.text=String(event.rowIndex);
//Don't know what should i assign to following labels...

[code]....

View 1 Replies

Flex :: Transform A String Into Object Name SelectedItem In The DataGrid?

May 20, 2010

I need to get the value of the item clicked and the name of the columns.[code]But this way it returns 'undefined'.But if I put the name already in function, I can get the correct data, example:Alert.show(''+datagridlist.selectedItem.create); // create is a column name in mysql.But this variable must be created dynamically, example:[code]I'm at it on time and I can not convert the string to column name.

View 2 Replies

Actionscript 3 :: Flex Databinding With SelectedItem Property Of The Combobox Update Many Times

Jan 23, 2010

well, I have a combobox which I have bind his selectedItem property to a value object object, like this

<fx:Binding source="styles_cb.selectedItem.toString()" destination="_uniform.style"/>
<fx:Declarations>
<fx:XML id="config_xml" xmlns="" source="config.xml" />
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<mx:ComboBox x="66.15" y="63.85" editable="false" id="styles_cb" dataProvider="{config_xml.styles.style}" />

the value object is a custom class with some setters and getters, and I want to set a property based of the value of the selectedItem of the combo, so inside the value object I have something like this

[Bindable]
public function set style(value:String):void
{
_style = value;
trace(value);
}

my problem is that each time I change the combobox selection which in fact change the style property of the value object it does it 3 times, if I trace the value of the setter it actually do the trace 3 times, why?? how can I avoid this? I'm doing something wrong? or there is a better way to do it,

View 2 Replies

Flex :: Mobile - Move To The Next Data In List.selectedItem When Moving To Next Page?

Sep 14, 2011

When I move page01 to page02, I pass the same data along with it using the following code:navigator.pushView(Page02, data);How do I move to page02 with passing the next row of data (instead of the same data)? In other word, how to increment to the next row of data with pushView?

View 1 Replies

Actionscript 3 :: Flex Databinding With SelectedItem Property Of The Combobox Update Many Times?

May 22, 2008

well, I have a combobox which I have bind his selectedItem property to a value object object, like this

<fx:Binding source="styles_cb.selectedItem.toString()" destination="_uniform.style"/>
<fx:Declarations>
<fx:XML id="config_xml" xmlns="" source="config.xml" />

[code].....

View 3 Replies

Flex :: How To Get An Icons In A Dropdownlist

Oct 21, 2010

In a dropdown how to get icons along with text and once we select any of the index from the dropdown i want that icon also be selected and to be displayed on that dropdown header

View 1 Replies

Flex :: Datagrid With Dropdownlist In A Particular Row?

Mar 5, 2011

I'm having difficulty figuring out how to add a dropdownlist control to only a single row of a data grid. For example, if I have two rows of data in the grid, I want the top to be the normal text from the data provider, and the second row to be a dropdownlist (bound to an array collection).

View 1 Replies

AS :: Flex - Select Value Of A DropDownList?

Mar 8, 2011

I'm sure this is a easy one but I've been searching for a while how to select a DropDownList element with actionscript. In this scenario, I'd like to be able to specify the selectedItem based either on ddlLabel or ddlData

<?xml version="1.0" encoding="utf-8"?>
<fx:Script>
<![CDATA[

[code].....

View 1 Replies

Flex Mobile 4.6 - Pass Data (selectedItem) From Master To Detail View In Splitview?

Dec 26, 2011

I have a tabbed view with in the second tab a splitview controller.

The master view shows a list. When selecting an item from that list it opens a second view with a new list by using navigator.pushView.

When I select an item in the second view/list it has to be passed to the detailview. Is there a simple solution available?

View 1 Replies

Flex :: Re-render ItemRenderer For A DropDownList?

Mar 2, 2011

I have created a custom ComboCheck which extends the spark DropDownList that is a DropDownList of checkboxes. Inside of my itemRenderer I have the code:

[Bindable]override public function set data (value:Object):void {
if (value!=null) {
_data = value;

[Code].....

This will also not cause the dropdownlist to reset to scrollPosition 0

View 3 Replies

Xml :: Flex - Add Items To DropDownList Using ItemRenderer?

Mar 17, 2011

I have a XML structure like:

<Main>
<Category1>
<Data Name="Data1">

[code].....

View 1 Replies

Flex :: Increasing The Width Of DropdownList?

Apr 15, 2011

I want to adjust the width of DropDownList control in flex 4. I could do it by editing the skinclass and setting the PopupAnchor's Property "popUpWidthMatchesAnchorWidth" to false, but in my application I have to do it using actionscript.

View 3 Replies

Flex :: DropDownList Selection When Using Keyboard In Air

May 11, 2011

Let's say I have a DropDownList with the 50 states in it. I would like to type in the letters "C + O + L" to jump to Colorado, like Firefox and most application do. Right now, it's jumping from California to Ohio to end with Louisiana.

View 3 Replies

Actionscript 3 :: Flex DropDownList ItemRenderer Probably A Bug

May 29, 2011

I am trying to make a simple change on look of Flex 4.5 Spark DropDownLis trough extending it's item renderer, anyway even a just shiny new item renderer bring me as result a items which labels is blanks. If i remove the renderer everything is fine, but with it - the items is blank white.

[Code]...

View 1 Replies

Flex :: Specify Individual Fonts In Flex DropDownList?

Feb 8, 2011

I have just implemented a dropdownlist of checkboxes taken from this ComboCheck example but made it extend DropDownList instead of ComboBox to provide better functionality that I required. I am attempting to create a DropDownList where some items are bold and non-checkboxes (or can be checkboxes) and others are not.

I have not been able to find anything online about doing this yet and have been trying to figure it out. I am currently using an ArrayCollection as a dataProvider but I think this could possibly be my issue and I should be trying to setup the labels in flex not AS3.[code]...

View 1 Replies

Flex :: How To Change Open DropDownList Height

Feb 18, 2010

Using FB4, I want to change the height of an open spark DropDownList. By default, it shows up to 6 items before scrolling. My dropdownlist contains 7 items, so I want to change the height of the open dropdown list to fit all 7 items without scrolling. As a workaround, I've changed the font size of the items so that they are smaller and all 7 fit, but the smaller font doesn't look good. Is there a way to change this height?

View 5 Replies

Flex :: DropdownList Does Not Show The Correct Values

Sep 7, 2010

I have a Flex Spark dropdownList in which I need to show the Provider FirstName,LastName:

<s:DropDownList id="providerList"
dataProvider="{model.practiceProviderList.practiceProviders}"
labelField="provider.providerName.firstName"/>

But the output shows only [object Object] & [object Object] as there are 2 providers in the DB and does not show the actual values.

The PracticeProviderList.as:

[Bindable]
[RemoteClass(alias="model.PracticeProviderList")]
public class PracticeProviderList extends PracticeProviderListBase {

[Code]....

The Provider has providerName:PersonName as one of it's fields & PersonName has firstName:String & lastName:String

View 1 Replies

Flex :: Cannot Bind Data To DropDownList Control

Sep 8, 2010

I'm fetching some data from a PHP application using Zend AMF. However I can't get the data to bind to a simple DropDownList control. The PHP method is:

[Code]...

View 2 Replies

Flex :: DropDownList Doesn't Work In New Window

Oct 29, 2010

In this code I'm creating a new window when I click the button. In the new window are TextInput and DropDownList components. When the new window opens, clicking the DropDownList does nothing - you have to click it a second time round to get it to open. However, click into the TextInput field first and then try opening the DropDownList works no problem.

Below is the code, or download the FXP file here.

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

[code]....

View 1 Replies

Flex :: Spark DropDownList As ItemEditor Within AdvancedDataGrid?

Mar 11, 2011

I'm trying to use the Spark DropDownList as itemEditor in an AdvancedDataGrid. Howerver, I've stumbled onto two issues:Clicking on a item in the DropDownList changes the selected row in the ADG. You can see this behavior by compiling the code from below and executing the following steps.The value changes from "A" to "C" and Row 3 is the selected row in the ADG. It looks like the mouse click in the DropDownList is also handled by the ADG itself which changes the selected row accordingly. I couldn't figure out a way to prevent this. The expected behavior would be that row 1 is still selected after the DropDownList has been closed.Clicking on the scrollbar of the DropDownList closes the DropDownList. (I just found the solution to this problem in the relatated questions while writing this: Scrollbars in dropdownlist inside DataGrid itemEditor not working)

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

[code].....

View 2 Replies

Flex :: DropDownList Doesn't Always Open On Click?

May 12, 2011

I have an AIR application with 2-3 DropDownLists and a bunch of other controls. The DropDownLists are bound to dataproviders (ArrayCollections) in a central Model singleton. On launch, they all work fine.

However, when I click a button to add new objects to an object in another ArrayCollection in the same Model, the DropDownLists get weird. They still register clicks, and all other controls still work as before, but the dropdowns won't open. Clicking/waiting enough usually opens the dropdown, but if I don't make another selection it still won't open after closing. Making a different selection makes that DropDownList work again, but the others might still refuse to open.

If I open the dropdowns using Ctrl + Down arrow, they work all the time, so it's only the click that doesn't trigger the open correctly. I can work around the problem by calling openDropDown() on the dropdown when clicked, but that doesn't feel right.

I'm using the 4.1 SDK, and the dropdowns are s:DropDownLists. I tried using mx:ComboBoxes instead, but got the same behavior. Edit: Weirdly enough, using s:ComboBoxes they work as they should, but I really don't want to use them since they seemingly can't be made non-editable.

View 2 Replies

Php :: End The ID Of The Selected Item Of A Flex DropDownList To The Server?

Jul 18, 2011

I am using FlashBuilder 4.5 for PHP. I have a simple MySQL table with the fields {tID, tName}.I am able to populate a DropDownList in a Flex form as below. The DropDownList shows the name of the people without problem:

<s:Form defaultButton="{button}">
<s:FormItem label="myList: ">
<s:DropDownList id="dropDownList" creationComplete="dropDownList_creationCompleteHandler(event)" >
<s:AsyncListView list="{getPeopleResult.lastResult}"/>

[code]....

The above does not work.

View 2 Replies







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