0

I am using a custom componenet based off of text as an itemRenderer for a dataGrid that is displaying an XMLList. I want to be able to re-use this itemRenderer for multiple columns, how do I access the dataGridColumn so I know which field to assign to the text value?

super.data gives me the whole XML item, super.parentDocument gives me the whole DataGrid

Thanks in advance.

1 Answer 1

3

It wasn't easy to find but the answer is:

data[(listData as DataGridListData).dataField

data is a reference to the XML item passes. listData is a property of anything that implements IDropInListItemRenderer. casting it as DataGridListData cause it's a dataGrid. This gave me access to the dataField property.

You can read the whole article I found here

The link will take you directly to the page I got my answer from, but the whole article is a good read for anyone new to itemRenderers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.