4 Replies Latest reply on Nov 3, 2009 10:24 PM by Flex harUI

    problem with xmllistcollection

    Bijender Vashist



           I am new in Flex programming world. I am facing the problem with xmllistcollection which is bind to datagrid. Please help me


           I have created the custom componet. In this custom datagrid component a column having combobox. the problem aries when there
      are two duplicate rows and if i change the value of one row's combobox value then another duplicate row's combobox value is autometically


      as i have attached the images.image 1 shows initial stage and image2 shows when i changed 5 row's combobox value then 8th rows combobox

      value is autometically changed.



      this is the code for change of combox value. commented code shows what i have tried right now




      public function DropDownEvent(evt:ListEvent):void
                   var xmlvalues:XMLListCollection= DataGrid(_listData.owner).dataProvider as XMLListCollection;
                   //var xmlListval:XMLList= xmlvalues.source as XMLList;            
                   //    XMLNotifier.getInstance().unwatchXML(xmlListval,);
               //     var xml:XML=xmlvalues.getItemAt(_listData.rowIndex) as XML;
               //    var strval:String=xml.toString();
               //    var lval:int= strval.indexOf(_listData.dataField);
               //    var lvalLength:int=_listData.dataField.length+lval+1;
              //     var str1:String=strval.substr(0,lvalLength);
                //   var lval2:int=strval.indexOf("</",lvalLength);
                //   str1=str1+evt.target.selectedItem+" "+strval.substr(lval2);
                //  var xmlNew:XML=new XML(str1);
               //    xmlvalues.removeItemAt(_listData.rowIndex);
                //   xmlvalues.addItemAt(xmlNew,_listData.rowIndex);
                 // evt.target.data[_listData.dataField]=evt.target.selectedItem;