Reputation: 2019
I have an itemrenderer used by multiple datagridcolumns and I need to have some condition in the itemrenderer based on the headertext of the datagrid column. Can I access the headertext property from within the itemrenderer?
My itemrenderer extends the LinkButton control and implements the IDropInListItemRenderer interface.
Thanks
Upvotes: 1
Views: 300
Reputation: 9897
Yes, you can. Since your item renderer implements IDropInListItemRenderer, it is getting BaseListData via listData setter. From BaseListData you get owner, columnIndex, rowIndex. Owner may not be list itself, but its parent will (I don't remember exactly, you have to check it in debug).
Upvotes: 3