Hi, 

I am not able to do a validation on the items of a combo box which 
is placed inside a component. I am 
drafting the scenario. 

Design part, 

<mx:Component id="comp"> 
<mx:Combo Box id="combo"> 
<dataprovider> 
<string>Please select<string> 
<string>decision1<string> 
<string>decision2<string> 
<dataprovider> 
</combo box> 
</Component> 

Now, in the screen, they have a datagrid wherein they populate list 
of members from the database and each member will have this combo 
box to make their decision. One column will be populated with 
members and another column will be populated with this combo box. 

getdatagrid() 
{ 

dgc.itemRenderer="comp" //where dgc is the datagridcolumn of the 
datagrid and comp is component ID 
} 

Now, what i need to do is the validation ----> I need to throw an 
errorString when the screen is submitted with the combo box 
showing "Please select" rather than decision1 or decision2. The 
member has to make a decision and thats the requirement. For this i 
need to access the combobox item in the validation function which I 
am not able to do. Could someone please help me??? This is very 
urgent... 

Validation() 
{ 
if(comp.combo.selectedItem=="Please select") 
{ 
} 
///this is not working saying cannot access the property combo

Reply via email to