2 Replies Latest reply on Aug 12, 2008 9:59 AM by anoweb

    DataGrid itemEditor - error when clicking elsewhere

    anoweb Level 1
      I have a DataGrid with a ComboBox itemEditor. The editor has its "dataProvider" bound to an ArrayCollection of "Person" objects. The Person class looks like:

      class Person {
      public var name:String;
      public var age:int;

      When i click on the cell in the datagrid the combobox appears and it displays the names of the Person object (because I set the "labelField" of the combobox to "name"). I select a Person and then click elsewhere. When I click elsewhere I get this error:

      TypeError: Error #1034: Type Coercion failed: cannot convert "Bob" to com.foo.Person.

      How do I fix this?