1 Reply Latest reply on Nov 11, 2011 3:41 PM by Flex harUI

    INline custom editor for spark column

    Zolotoj Level 3

      Here is quick column definition:

      <s:GridColumn dataField="label1" headerText="Order #" editable="true">

                          <s:itemEditor>

                              <fx:Component>

                                  <s:GridItemEditor>

                                      <s:TextArea/>

                                  </s:GridItemEditor>

                              </fx:Component>

                          </s:itemEditor>

                      </s:GridColumn>

       

      It will fail at the run time:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

          at spark.components.gridClasses::DataGridEditor/setEditedItemPosition()[E:\dev\4.5.1\framewo rks\projects\spark\src\spark\components\gridClasses\DataGridEditor.as:312]

          at spark.components.gridClasses::DataGridEditor/dataGrid_gridItemEditorSessionStartingHandle r()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\gridClasses\DataGridEditor .as:1204]

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]

          at spark.components.gridClasses::DataGridEditor/startItemEditorSession()[E:\dev\4.5.1\framew orks\projects\spark\src\spark\components\gridClasses\DataGridEditor.as:798]

          at testGrid/startItemEditorSession()[C:\testarea\Flex\Test Project\gridComboRenderer\src\testGrid.as:27]

          at gridComboRenderer/onChange()[C:\testarea\Flex\Test Project\gridComboRenderer\src\gridComboRenderer.mxml:30]

          at gridComboRendererInnerClass2/___gridComboRendererInnerClass2_Button1_click()[C:\testarea\ Flex\Test Project\gridComboRenderer\src\gridComboRenderer.mxml:69]

       

      Am I doing it wrong?