GridView Container.DataItem?

It's a little embarrassing to ask about this, but what is equivalent to Container.DataItem from a DataGrid to a GridView. I do not want to use Eval, and I do not want to bind it to a DataSource control. I want to do this <%#((MyType)Container.DataItem).MyAttribute %>in the template box.

SOLVED : Nevermind, it really works, my tag was not closed on the aspx page correctly.

+3
source share
1 answer

You can use Container.DataItem with a GridView - what you have there looks great. What error are you getting?

This link may also help: What is the deal with DataBinder.Eval and Container.DataItem ?

+1
source

Source: https://habr.com/ru/post/1716024/


All Articles