Hi,

 I found that i had to set 
comboLabel.text = combo.dataProvider[i].label;
for it to display the correct values.

Regards
Rajesh J


--- In [email protected], "Rajesh Jayabalan" <[EMAIL PROTECTED]> wrote:
> Hi Sree,
> 
>  That helped an another solution that I found was to use
> 
> combo.dataProvider = parentDocument.clTypeSrv.result.types.type; 
> 
> in my setValue method of the cell renderer.
> 
> Now my combobox is showing up fine, but it is not selecting any thing
> by default and when I select some option and move to a diffent row I
> see [object,object] in there. I think this is because the example I am
> using does not have a data and a label while mine has
> 
> the xml I am using is
> 
> <?xml version="1.0" encoding="utf-8" ?> 
> <types>
>   <type label="-- Select --" data="" /> 
>   <type label="Advertising Company" data="AD/PROMO CO" /> 
>   <type label="Broker" data="BROKER" /> 
>   <type label="Clearing Company" data="CLEARING" /> 
>   <type label="Agency" data="DEMO AGENCY" /> 
>   <type label="Distributor" data="DISTRIBUTORS" /> 
>   <type label="Manufacturer" data="MANUFACTURER" /> 
>   <type label="Marketing Company" data="MARKETING CO" /> 
>   <type label="Other" data="OTHER" /> 
>   <type label="Retailer" data="RETAILER" /> 
> </types>
> 
> 
> my setValue looks like
> 
> function setValue( str : String, item : Object, selection : String ) :
> Void
>   {
>         //combo.dataProvider = parentDocument.clTypeSrv.result.types.type;
>     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 );
>     }
>   }
> 
> I thought maybe there might be a method getData in the list that I can
> use but I don't think there is one.
> 
> I am not sure how to more forward
> 
> Rajesh J




 
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/
 


Reply via email to