L
Lubomir
Hi,
I have a gridview with tepmlate and boundfield columns.
Two of columns are defined as follow:
<asp:BoundField HeaderText="Test" ...../>
<asp:TemplateField>
<ItemTemplate>
<%# MyMethod(Eval("Test")) %>
</ItemTemplate>
</asp:TemplateField>
The column in a template field takes value from the Test column and returns
some new value, showing it in the gridview.
In the Page_Load (!IsPostback) I am renaming the bound column header "Test"
to other name and at the end I call DataBind. I expected the template item
will not be evaluated properly, as the header text "Test" doesn't exists
anymore, but it keeps working fine.
My question is, when is evaluated the <%# MyMethod(Eval("Test")) %> ?
Thanks,
Lubomir
I have a gridview with tepmlate and boundfield columns.
Two of columns are defined as follow:
<asp:BoundField HeaderText="Test" ...../>
<asp:TemplateField>
<ItemTemplate>
<%# MyMethod(Eval("Test")) %>
</ItemTemplate>
</asp:TemplateField>
The column in a template field takes value from the Test column and returns
some new value, showing it in the gridview.
In the Page_Load (!IsPostback) I am renaming the bound column header "Test"
to other name and at the end I call DataBind. I expected the template item
will not be evaluated properly, as the header text "Test" doesn't exists
anymore, but it keeps working fine.
My question is, when is evaluated the <%# MyMethod(Eval("Test")) %> ?
Thanks,
Lubomir