1 Reply Latest reply on Nov 24, 2008 8:02 PM by Newsgroup_User

    Combobox with XML

      Hi All,
      here i have a problem with Comobobox with XML.

      My problem is "I have two comboboxes and one XML file".What ever data is there in the XML file that data i'm getting and put it in both comboboxes but for one combobox i want to add one element explicitly .

      Can u tel me how to do that.........
      this is my XML file..

      <?xml version="1.0" encoding="UTF-8"?>

      Explicitly i want add the "All" element for one combobox.
      this is my MXML file....

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="getCategory.send();">

      public var categoryList:ArrayCollection;

      public var filterList:ArrayCollection;

      private function categoryResult():void
      categoryList = getCategory.lastResult.CategoryList.CategoryListitems;
      deltaskcategory.dataProvider = categoryList;
      //Alert.show("Category list data "+ categoryList);
      deltaskcategory.selectedIndex = -1;

      filterList = getCategory.lastResult.CategoryList.CategoryListitems;
      //Alert.show("filterlist list data "+ filterList);
      categoryGroup.dataProvider = filterList;

      <mx:HTTPService id="getCategory" url="combo.xml" result="categoryResult(); />
      <mx:ComboBox id="categoryGroup" width="100" labelField="category"/>
      <mx:ComboBox id="deltaskcategory" width="160" labelField="category"/>