1 Reply Latest reply on May 4, 2010 9:01 PM by Flex harUI

    I need help with Combobox

    Mara G.

      Hi there!

       

      I have 2 tables:

       

      categories

      id

      codcateg

      namecateg

       

      products

      id

      codprod

      categ --> save namecatg

      nameprod

       

      The categories are loaded in a combobox and when I search a product I need display the record that I choose in a datagrid after search.

       

      I made this function that works except for the combobox that seems reload because always show the same value.

       

      public function editProd(id_myprod:Number, codproduct:String, catego:String, nameproduct:String):void {

      id_selected = id_myprod;

      codprod_p.text = codproduct;

       

       

      categ_p.selectedItem.categ = catego; // IT DOESN'T WORK

      nameprod_p.text = nameproduct;

      }

       

      in my mxml I have...

       

      <mx:TextInput  id="codprod_p"/>

      <mx:ComboBox dataProvider="{categoriesList}" width="160" labelField="namecateg"  id="categ_p" ></mx:ComboBox>

      <mx:TextInput id="nameprod_p"/>

      Hope someone can help me...
      Regards!
      Mara.-