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


Similar Posts:


Flex :: Scrollbars In Dropdownlist Inside DataGrid ItemEditor Not Working

Aug 17, 2010

I have a DropDownList inside the itemEditor of my DataGrid. There are enough items in the DropDownList to justify scrollbars. You can see the scrollbars, and the mousewheel works fine. If you move the mouse over the scrollbars, they'll change appearance fine (mouseover is working). If you click on them, the DropDownList closes as if you'd clicked elsewhere in the data grid.

I've been experimenting with custom skins hoping to find a way to trap the mouse event, but have been unsuccessful.

FWIW, this is Flex4, as an AIR app.

Scratch.mxml (main code)

<?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 2 Replies

Flex :: ItemRenderer Shows Through ItemEditor On AdvancedDataGrid

Apr 5, 2011

When not editing the cell, it shows a centered date as plain text. When editing, it shows a DateField editor. The second example is exactly the same as far as I can tell, other than the fact that it is an AdvancedDataGridColumn. Using that code with an AdvancedDataGrid, when I go into edit mode I can see the text from the normal item renderer behind the DateField editor (between the text input and calendar icon).

Example 1:

<mx:DataGridColumn id="endColumn"
dataField="endDate"
headerText="End"

[Code]....

View 1 Replies

Flex :: ItemEditor In AdvancedDataGrid When Using Hierarchical Data As DataProvider

Mar 23, 2011

Following is the sample code. While I start editing either in optionId column or option column, the other rows of the same column are also get affected and reflecting the same value. But when I am editing in other columns it is working fine... Don't know the reason.

[Code]...

View 1 Replies

Flex :: Apply Image States In Spark Dropdownlist?

May 9, 2011

I have a spark dropdownlist and I have applied custom skin on it to display images in it instead of labels.

<s:DropDownList id="id_cbLineType"
skinClass="assets.skins.SkinDropDownImageList"
itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"

[code].....

View 2 Replies

Flex :: Get A Spark DropDownList SkinClass And TypicalItem To Live Happily Together?

Aug 31, 2010

How does one go about calling a skinClass on a DropDownList component without compromising the typicalItem functionality?

[Code]...

View 1 Replies

Actionscript 3 :: Flex 4 Remove Selected Item From Spark DropDownList

Jun 30, 2011

My stakeholder has a request to remove the currently selected item from the DropDownList control(s) in the application. For example a drop down with [item1, item2, item3, item4] if item2 is selected then the only items in the drop down will be [item1, item3, item4]

Using Flash Builder 4 with Flex 4.0 sdk

View 2 Replies

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

Actionscript 3 :: Flex Spark ComboBox In A MX AdvancedDataGrid?

Sep 17, 2010

I would like to use a combobox as the itemEditor for one of the columns of an AdvancedDataGrid. I looked around and decided to use Spark ComboBox components - they're slick and seem to natively support a lot of neat stuff including auto-completing strings when types in the textInput. After some tinkering I managed to add a spark ComboBox to my ADG, setup its data provider in order for it to expand as the user adds new items, and hook it all up. The result seems promising, but as always, a few details have been impossible to overcome for me (indeed I'm not a flex pro quite yet) and was hoping that someone could point me in the right direction. The code is pasted below and uses the tricks described here to use a spark component as an itemEditor for an mx grid.

If you play with the (super simple) app you will notice that if you click (a couple of times) on the last column to the right and open the ComboBox you can pick a value from the list, click on a different cell, and the selected value will appear in the cell you just left. However, and here starts the list of annoying things:

if you start typing in the ComboBox and press enter when the desired item comes up the ComboBox will remain emptyif you type a new item in the ComboBox and press enter the item gets added to the data provider (correct behavior) but the ComboBox still remains empty when you first click on a cell its current value also disappears I debugged the first two annoying scenarios and it seems that pressing Enter leads to advanceddatagrid1_itemEditEndHandler being called before myCB_changeHandler, which means that myRetVal is never set when the dataGrid does its update on its cells. The opposite happens if one selects from the list, i.e.

The MXML App

<fx:Declarations>
<s:ArrayCollection id="myCbDb"/>
</fx:Declarations>
<fx:Script>

[code]....

View 2 Replies

Actionscript 3 :: Flew Spark Dropdownlist - Add Separator Between Item?

Jan 20, 2012

I am trying to create a dropdown that can display both past state and possible state for a customer.But I want to make add a separator between past and possible state.Actually to do that I add an item like "-----" on the dataprovider.But the look and feel is not good and this item may be selected.My ideal approach is something like that:

View 2 Replies

Actionscript 3 :: Spark Scroller In AdvancedDataGrid?

Oct 13, 2010

AdvancedDataGrid uses a Halo Scroller by default. How can I change it to a Spark Scroller?

View 2 Replies

Flex :: How To Prevent Itemeditor Destruction

Nov 24, 2009

My custom item editor opens a titlewindow (too much stuff to show in an inline editor) which obviously steal the focus, so I get a itemeditend event and the datagrid destroy the editor at the wrong (for me) time. I think to have to keep the itemeditor alive until the titlewindow job is done, but how? DataGridEvent reason is "other" and livedocs said preventDefault() can't help.

View 1 Replies

Flex :: Difference Between ItemRenderer And ItemEditor?

Dec 24, 2009

What is the Difference between ItemRenderer and ItemEditor?And When ItemRenderer is initializing and loading?

View 1 Replies

Flex :: Commit New Value From ItemEditor Before ItemEditEnd Event

Sep 7, 2009

I have a DataGrid, with itemEditor as NumericStepper in a few columns. When a value in the DataGrid is edited, I would like to update several values displayed on the screen, and so want to call a updateValues() function.First, I added this function to itemEditEnd event of the DataGrid, but the function is getting called before the new value is updated into the dataProvider and hence, the values I have in the function are the old values. Is there any other event that is fired after the values are updated into the dataProvider? or am I missing something?Second, I tried putting this function in the change event of each itemEditor (duh!), but then again, the change event is fired, but the values in the dataProvider are the old ones.Is there any way I can make the function updateValues() be called, every time a value is edited AND updated into the dataProvider, because there's where I am taking the values from?

View 1 Replies

Flex :: Datagrid - Pass A Parameter To ItemEditor?

Jul 19, 2010

I have a datagrid where one column calls a custom an itemEditor like;

<mx:DataGridColumn dataField="city"
width="150"
headerText="City"

[code].....

View 3 Replies

Flex :: Trigger An ItemEditEnd Event Within The ItemEditor

Sep 29, 2010

This might be an easy one for you DataGrid experts out there. I following an example for adding rows to a DataGrid dynamically from within a row

[URL]

My tweak that I am trying to acoomlish, is to have a custom itemEditor that is a form with two TextInputs and an OK button. For the life of me I can't get that button to trigger the DataGrid's itemEditEnd event where I have some processing before I call destroyItemEditor. I tried dispatching the event myself directly but got a strange error in DataGrid's updateDisplayList saying editedItemPosition was null (editedItemPosition.rowIndex).

View 2 Replies

Flex :: DataGrid With Variable Custom ItemEditor On A DataGridColumn?

Jun 18, 2010

Is there anyway to create a custom item editor based on the dataField value? For example:

<mx:DataGrid editable="true" dataProvider="{_actionArr}" id="prop">
<mx:column>
<mx:DataGridColumn headerText="Component" editable="false" dataField="label"/>

[code]....

View 2 Replies

Flex :: DataGrid Lines Showing Through ItemEditor - Opaque?

Sep 18, 2010

I have a datagrid column as follows:
<mx:DataGridColumn
headerText="Description"
dataField="description"
editable="true"
editorXOffset="2" editorYOffset="2"
editorHeightOffset="20" editorWidthOffset="60"
itemEditor="com.jono.controls.DgItemEditor"
wordWrap="true"
/>

And a very simple DgItemEditor:
<?xml version="1.0" encoding="utf-8"?>
<mx:TextArea xmlns:mx="[URL]" wordWrap="true" backgroundColor="#FFFFFF" backgroundAlpha="1">
</mx:TextArea>

Basically, this allows for a small 'popup' when the user edits a cell in the datagrid, allowing for more space to type. The problem that I am having is that the datagrid gridlines show through the itemeditor - i.e. the itemeditor is transparent. Is there any way that I can force it to be opaque?

View 1 Replies

Flex :: Getting Error When Use Itemrenderer And Itemeditor Components In The Datagrid Column

Apr 11, 2011

[Code]...

ErrorStackTrace: ReferenceError: Error #1069: Property text not found on a.mxml.a_inlineComponent3 and there is no default value.

View 2 Replies

Actionscript 3 :: Spark Images In Spark List With TileLayout Disappear On Scroll And Drag In Flex App

Jul 1, 2011

I have a renderer that looks like this:

[Code]...

Loading thumbnails using this method works perfectly. The issue happens when you scroll the List.

View 1 Replies

Flex :: 4 - Add Component To Title Bar Of Spark Panel Or Spark TitleWindow

Feb 7, 2011

I'm looking to add a couple of buttons to the title bar of a Spark Panel or Spark TitleWindow. Is this possible to do without making the panel from scratch?

View 1 Replies

Flex :: Strange Copy/paste Behavior In Custom ItemEditor Component Used In A Datagrid?

Feb 10, 2011

I'm turning to you folks for answers because this really blows my mind... Let me explain:I'm using a slightly modified spark NumericStepper as an item editor in a datagrid. I had to modify the original because for some reason it's values only went up to 10.So i extended NumericStepper like so:

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

[code].....

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

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







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