Yasmine
Yasmine

Reputation: 2019

Is it possible accessing the headertext of a datagridcolumn from its itemrenderer?

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

Answers (1)

alxx
alxx

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

Related Questions