I am doing an inline combobox as itemEditor for a datagrid column. One of the tasks is to set the initial selectedItem of the combobox to what is already in the datagrid cell. I can access the grid data via

outerDocument.controlID.selectedItem.dataField

and do the loop to select the correct combobox item, however, I would prefer to use the more abstract data keyword so that the same component can be used by other datagrids aswell. I tried to cast listData to DataGridListData and then access the data array, but somehow these classes and types don't  get recognized (this is inside a <mx:script> CDATA section of the inline component). I also imported the mx.controls.dataGridClasses and the mx.controls.listClasses, still no success.

...
private function doInitialSelect():void
{
var myListData:DataGridListData = DataGridListData(listData);
for(var i:int=0;i<this.dataProvider.length;i++)
{
if(this.dataProvider[i].Text == data[myListData.dataField])
{
....

Any ideas what needs to be done? Thanks a million...

-Iko

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to