If you are using DataGrid and IListItemRenderers there should still be a
data property in Flex 4. And DataGridListData if you implemented
Well earlier in mx Button, listData and data properties were available, through which we had access to data and the field that is bound to this column, however now in spark Button, both the properties are missing. There is no way I can get associated data from any of spark components.
Can you give me some code snippet of how can I access this MXDataGridItemRenderer?
I caught bubbled event from the button so I receive "Event" and its' source gives me instance of the button as follow..
Button b = e.source as Button;
now how do I get the data item or row associated with this button?
It is in the Flex 4 doc.
Where is it? Do you have the link, I looked for documentation of all MXDataGridItemRendrer an
d all the classes in the same package, I know I can climb up the visual tree to get it, but there should be proper api for it.
Oh god, am i not writing correct english?? You think after downloading Flash Builder, and all documentation and navigating
google is it that difficult for me to findout the asdoc page for this class and I will come here to ask you for this help page? I had seen this well before and I do not see any connection between this page and the question I asked, I want to know how can I get this instance from the button that I received in the event, not the asdoc of this class of what it can do and it cant.
I probably misread your earlier post.
Should be the Button's document property. Depends on how you wrote it.
No, Button's document property can not be, because button is different for each row, Data Grid assigns "data" property of every control that is inside item renderer in case of mx components, but spark components do not have "data" and "listData" at all. So they can not be used as item renderers, I think we have to manually create a new component derived from spark button and create a new data property and assign them manually in item renderers.
If you have wrapped an MXDataGridItemRenderer around your Spark Button as
you should have if you read the documentation as you claim to have done,
then the Button's document property should point to the
MXDataGridItemRenderer which will have the dataGridListData for that row.
You are welcome to subclass Spark Button and have it implement
IDropInListItemRenderer, and doing so will make for more efficient
renderers, but the purpose of MXDataGridItemRenderer was to make it easier
for you to write renderers involving spark components without having to
The choice is yours.