Skip navigation
autokads
Currently Being Moderated

unable to add button to spark datagrid

Jan 4, 2013 10:58 AM

when i add the code and launch, i get a white screen - no errors.  I'm able to do it in the flex libraries but not spark, here is my code (top does not work so commented out)

 

<s:DataGrid dataProvider="{EdsDataArray}" width="100%">

                              <s:columns>

                                        <s:ArrayList>

                                                  <s:GridColumn dataField="id"/>

                                                  <s:GridColumn dataField="NAME"/>

                                                  <s:GridColumn headerText="Remove">

                                                            <!--s:itemRenderer>

                                                                      <fx:Component>

                                                                                <mx:Button label="Delete" click=""/>

                                                                      </fx:Component>

                                                            </s:itemRenderer-->

                                                  </s:GridColumn>

                                        </s:ArrayList>

                              </s:columns>

                    </s:DataGrid>

 

                    <mx:DataGrid id="dg" dataProvider="{EdsDataArray}" width="100%">

                    <mx:columns>

                              <mx:DataGridColumn headerText="ID" dataField="id"/>

                              <mx:DataGridColumn headerText="NAME" dataField="NAME"/>

                              <mx:DataGridColumn headerText="Remove">

                                        <mx:itemRenderer>

                                                  <fx:Component>

                                                            <mx:Button label="Delete" click=""/>

                                                  </fx:Component>

                                        </mx:itemRenderer>

                              </mx:DataGridColumn>

                    </mx:columns>

  </mx:DataGrid>

 
Replies
  • Currently Being Moderated
    Jan 6, 2013 11:06 PM   in reply to autokads

    Hi,

     

    Try the following to work for Spark:

        

    <s:GridColumn headerText="Remove" editable="false">

        <s:itemRenderer>

            <fx:Component>

                <s:GridItemRenderer>

                    <s:Button label="Delete" />                               

                </s:GridItemRenderer>

            </fx:Component>

        </s:itemRenderer>

    </s:GridColumn>

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points