The highlight works for me in this example:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0" xmlns:local="*" height="500" > <mx:Script> <![CDATA[ private var arr:Array = [ { enabled: false, selected: false, firstName: "Alex", lastName: "Harui" }, { enabled: true, selected: true, firstName: "Gordon", lastName: "Smith" }, { enabled: false, selected: false, firstName: "Deepa", lastName: "Subramanian" }, { enabled: true, selected: false, firstName: "Matt", lastName: "Chotin" }, { enabled: false, selected: true, firstName: "Ely", lastName: "Greenfield" }, { enabled: true, selected: false, firstName: "Kevin", lastName: "Lynch" }, { enabled: false, selected: false, firstName: "Shantanu", lastName: "Narayan" }, { enabled: true, selected: false, firstName: "Joan", lastName: "Lafferty" }, { enabled: false, selected: false, firstName: "Ryan", lastName: "Frishberg" }, { enabled: true, selected: false, firstName: "Jason", lastName: "Szeto" }, { enabled: false, selected: false, firstName: "Mark", lastName: "Anders" }, { enabled: true, selected: false, firstName: "Peter", lastName: "Flynn" }, { enabled: false, selected: false, firstName: "Heidi", lastName: "Williams" } ]; ]]> </mx:Script> <mx:ComboBox id="cb" initialize="cb.dataProvider=arr" labelField="lastName"> <mx:dropdownFactory> <mx:Component> <mx:DataGrid> <mx:columns> <mx:DataGridColumn dataField="firstName" headerText="First Name" /> <mx:DataGridColumn dataField="lastName" headerText="Last Name" /> </mx:columns> </mx:DataGrid> </mx:Component> </mx:dropdownFactory> </mx:ComboBox> </mx:Application> ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Tuesday, March 04, 2008 8:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamically highlighting a datagrid row I've looked for a combobox that drops down a datagrid, but have not found one so I'm building one that suits my needs. I have my POC working but after selecting a row in the datagrid and the combobox closing as it should, then reopening the combobox loses the hightlighted row in the datagrid. I've successfully reset the datagrid selectedIndex to what it should be, but I can't figure out how to highlight that row. I'm asking for two suggestions: 1. If any one knows of a combobox that drops down a datagrid I'd like to know about it as I don't like recreating the wheel. 2. Advice on how to dynamically highlight the datagrid row. Thanks, Dale