hi buddy
i belive this will help u and its not so comlex
function setValue( str : String, item : Object, selection :
String ) : Void
{
if ( item == undefined )
{
comboLabel.visible = false;
combo.visible = false;
return;
}
if ( selection == normal || selection == highlighted )
{
comboLabel.text = item[ getDataLabel() ];
combo.visible = false;
comboLabel.visible = true;
}
else if ( selection == selected )
{
selectedItem = item;
for( var i = 0; i combo.dataProvider.length; i++ )
{
if( combo.dataProvider[i] == item[ getDataLabel() ] )
{
combo.selectedIndex = i;
break;
}
}
comboLabel.visible = false;
combo.visible = true;
combo.setFocus( false );
}
}
--- In flexcoders@yahoogroups.com, Pradeep Chaudhary
[EMAIL PROTECTED] wrote:
Hi,
This is my second post regarding custom cell renderer issue. I'am
trying to create a custom ComboBoxCellRenderer to be used in
DataGrid.
By default label is selected Item label value. On clicking in the
cell
ComboBoxCellRenderer is displayed with selected value. But the
ComboBox never disappears when i click outside it. This is similar
problem that i faced in custom DateCellRenderer.
Can anybody please suggest what I'm missing.
Attached is source code for the ComboBoxCellRenderer
Thanks in advance,
Pradeep
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/