You need to set the owner of the dropdown to the skin.

On 9/8/10 12:55 PM, "Stephen" <> wrote:

Here is my code, every time I click on the drop down list scroll bars it closes 
rather than scrolls. I've not had any answers to this problem. So if you can 
figure it out their is a heap of kudos for you.

Good luck!

** inbed.mxml **

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="";
   xmlns:mx="library://" minWidth="955" minHeight="600">
<s:VerticalLayout horizontalAlign="center" paddingTop="10" gap="10"/>

import mx.collections.ArrayCollection;

protected var acPeople:ArrayCollection = new ArrayCollection(
[ { people_id: 1, people_name: 'Stephen', people_family:1},
{ people_id: 2, people_name: 'Sheila', people_family:1},
{ people_id: 3, people_name: 'David', people_family:1},
{ people_id: 4, people_name: 'Ross', people_family:2},
{ people_id: 5, people_name: 'Gareth', people_family:2},
{ people_id: 6, people_name: 'Joyce', people_family:2}

<!-- Place non-visual elements (e.g., services, value objects) here -->

<s:Label text="People And Family Names" fontWeight="bold"/>
<mx:DataGrid dataProvider="{acPeople}" rowCount="3" editable="true">
<mx:DataGridColumn headerText="Index" dataField="people_id" editable="false"/>
<mx:DataGridColumn headerText="First Name" dataField="people_name" 
<mx:DataGridColumn headerText="Family Name" dataField="people_family" 
   rendererIsEditor="true" editorDataField="selection"/>


** render.mxml **

<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="";

import mx.collections.ArrayCollection;


public var selection:int;

protected var acFamily:ArrayCollection = new ArrayCollection(
[ { family_id: 1, family_name:"Brown"},
{ family_id: 2, family_name:"Owen"},
{ family_id: 3, family_name:"Johnson"},
{ family_id: 4, family_name:"Harding"},
{ family_id: 5, family_name:"Manson"},
{ family_id: 6, family_name:"Philips"},
{ family_id: 7, family_name:"Hedge"}

protected function dropdownlist1_changeHandler(event:IndexChangeEvent):void
selection = event.newIndex;


<s:DropDownList dataProvider="{acFamily}" labelField="family_name"
width="100%" top="2" bottom="2" left="2" right="2"/>


Alex Harui
Flex SDK Team
Adobe System, Inc.

Reply via email to