2 Replies Latest reply on Sep 6, 2011 10:23 AM by Flex harUI

    Can't see model data within inline ItemRenderer in Spark DataGrid

    Neal Hudson Level 1

      I'm having an issue viewing some model data within an inline ItemRenderer, in a Spark DataGrid


      Here is the code for the DataGrid


      <s:DataGrid id="moduleDG" includeIn="HomeRequired" x="20" y="116" width="764" height="404"

      click="DGchangeHandler(event)" dataProvider="{model.items}"  >



      <s:GridColumn id="myModuleName" dataField="moduleName" headerText="{model.ui_nameColumn_str}" />

      <s:GridColumn id="myEnterColumn" dataField="launchActionText" headerText="{model.ui_actionColumn_str}">




      <s:Button label="{parentDocument.model.ui_nameColumn_str}" />









      In the inline ItemRendered, without the parentDocument reference I get a 1120: Access of undefined property model Error. If I use outerDocument I get 1178: Attempted access of inaccessible property model through a reference with static type Error. I'm not sure what I should be using here...


      The next column has no trouble viewing the model.ui_nameColumn_str property - I understand the issue is around scope and viewing the correct instance, I'm not sure how to get at the model from the inline ItemRenderer. (We're using simplemvc)