How can I access the parent datasource in data expression syntax in Asp.net?

692 Views Asked by At

I have a Repeater inside the TemplateField for a GridView. GridView is bound to datasource1 and the repeater to datasource2. How can i access datasource1 from the ItemTemplate of repeater in data binding syntax (<%# %>) of repeater itemtemplate?

1

There are 1 best solutions below

0
On BEST ANSWER

See this question. That question was relevant to Repeaters but you get the idea. The GridView exposes the RowDataBound event which you can handle in the same way.

Of course, I don't believe there is a way to access it via the declarative Databinding syntax.