0 Replies Latest reply on Dec 17, 2010 3:04 AM by Homer2811

    Databinding datagrid two way



      I'm trying to configure databinding in a datagrid to an arrayCollection, I have the data displaying fine inside of the datagrid my issue relates to when I make a change in the datagrid it's not making the change in the class in the background so when I query the class later it is holding the wrong data,



      <mx:DataGrid id="resourceGrid" dataTipFunction="DataGridTooltipBuilder" dataProvider="{this._CurrentJobObject._scheduleItem}" rowCount="{this._CurrentJobObject._scheduleItem.length}" color="black" width="350" >
                              <mx:DataGridColumn id="WorkerCol" editable="true" resizable="true" headerText="Worker Name" dataField="Assigned_WorkerName" color="black" showDataTips="true"  />
                              <mx:DataGridColumn headerText="Worker ID" dataField="Assigned_User_ID" color="black" visible="false"  />
                              <mx:DataGridColumn id="colUse" headerText="Use" dataField="to_use" color="black" width="35" resizable="false" editable="true" >
                                          <mx:CheckBox paddingLeft="10" />
                              <mx:DataGridColumn id="colLock" headerText="Lock" dataField="lock" color="black" width="35" resizable="false" >
                                          <mx:CheckBox paddingLeft="10"  />

      script definition 1

      public var _CurrentJobObject:JobObject;

      script definition 2 ( _scheduleItem is a collection of ScheduleItem classes)

          public class JobObject
              public var _scheduleItem:ArrayCollection;

      script definition 3

          public class ScheduleItem extends EventDispatcher
              public var _requiredAbilities:ArrayCollection;
              public var _requredAbilitiesNode:XMLNode;
              public var _userId:String;
              public var _name:String;
              public var _modelId:String;
              public var to_use:Boolean;
              public var lock:Boolean;
              public var Assigned_User_ID:String;
              public var Assigned_WorkerName:String;
              public var Server_Address:String;



      so my issue occurs with the combo boxes not changing the lock or to_use boolean values in the scheduleItem class any help would be appreciated.