1 person found this helpful
Two problems I see with your code. First, to get any rows in your dataGrid, you need a dataProvider defined. The itemRenderer in general just renderers the data from the dataprovider. It is possible to have additional controls in other columns that are not populated by the dataProvider, but you need to at least define a dataProvider.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex / AIR Development, Training, and Support Services
There are few mistakes in your code. The one with red color are mistakes.
<mx:DataGrid id="grd1" x="41" y="203" width="159">
<mx:DataGridColumn headerText="Button" >
<s:Button name="OK" id="btn_ok"/>
<mx:DataGridColumn headerText="Cancel button" >
<s:Button name="Cancel" id="btn_cancel"/>
- instead of fx type mx. even for s:button use mx:button
- you should have a closing tag fro columns </mx:columns>
- you sould not use name property for button unless it is your custome property. use label instead of name.
- I am sending you sample MXML code as attachment after correcting your code. Just go through it. try to execute.
sample.mxml.zip 575 bytes