0 Replies Latest reply on Oct 29, 2009 10:51 AM by SiHoop

    XMLListCollection problem

    SiHoop Level 1

      I'm trying to update an XMLListCollection but when I use the following code the resulting trace statment indicates that peopleDataGrid.selectedItem has changed from an 'xml' object to an 'object' object. Why has this happened and can I prevent it from changing?

       

      trace("type of 0="+typeof(peopleDataGrid.selectedItem);//RESULT: xml

       

      peopleColumn.setItemAt({teacherID:peopleDataGrid.selectedItem.teacherID, password: peopleDataGrid.selectedItem.password,
                  first_name:editFirstName.text, last_name: editLastName.text, email: editEmail.text,
                  login_name: editLastName.text+peopleDataGrid.selectedItem.teacherID, user_name:editName}, peopleDataGrid.selectedIndex);

       

      trace("type of 1="+typeof(peopleDataGrid.selectedItem));//RESULT: object