1 Reply Latest reply on Dec 19, 2011 4:22 PM by supersonicecho

    how to session save an editable data grid when using an editable item renderer check box?


      I have an itemRenderer in my spark DataGrid containing a CheckBox, and have set the renderIsEditable.   This all seems to work, except that my DataGrid "gridItemEditorSessionSave" event is not thrown.  In the example code below, if I click in to Name or address, make a change and then click or tab out, the session save event is thrown properly so I can save the data.   If I toggle the check box however, the event is not thrown!   The data IS changing though.    I even tried in the example below starting and ending the editor session, which looks ok in debug mode, but the session save handler never get's called for the DataGrid.   How can I have an editable item renderer check box and have it call my save handler properly?



      <s:DataGrid  id="recsDG"  width="100%" height="100%" dataProvider="{_recs}"
      editable="true" gridItemEditorSessionSave="recsDG_gridItemEditorSessionSaveHandler(event)"  alternatingRowColors="[#FFFFFF, #CCCCCC]">

      <s:GridColumn headerText="Name" dataField="name"/>
      <s:GridColumn headerText="address" dataField="address"/>

      <s:GridColumn headerText="active" dataField="active" rendererIsEditable="true">
                                          import spark.layouts.RowAlign;
      <s:CheckBox id="cbActive" selected="@{data.active}" 
      change="outerDocument.recsDG.startItemEditorSession(rowIndex,columnIndex); outerDocument.recsDG.endItemEditorSession(false);" horizontalCenter="0"/>

      <!--<s:GridColumn headerText="active" dataField="active">
                                <s:CheckBox id="cbActive" selected="@{value}"   horizontalCenter="0"/>

                  </s:GridColumn> -->