11 Replies Latest reply on Jan 5, 2010 4:31 AM by uzairseedat

    How to refer to DataGrid dataProvider from within the ItemRenderer?

    uzairseedat Level 1

      I have DataGrid with columns having ItemEditors. Within one of the ItemEditor components I want to refer to the dataProvider of the DataGrid. How should I do that. I've tried using the super keyword and found it can't be used there.

       

      The portion in bold is where I want it.

       


      ////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////


      <mx:DataGridColumn headerText="Image" dataField="img" editable="false">
                         <mx:itemRenderer>
              <mx:Component>
                  <mx:VBox>           
                      <mx:Image source="delete-icon.png" click="outerDocumentRemoveRow(event, parent.dataProvider )">
                         
                          </mx:Image>
              </mx:VBox>
              </mx:Component>
          </mx:itemRenderer>
      </mx:DataGridColumn>

       

      ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////