J
John E.
I have an ASP.NET datagrid with several bound columns. I need to make the
header of some of these columns display a string that is generated from the
code behind (i.e. a dynamic header). How is this done?
I have tried with both a templatecolumn and boundcolumn. I thought it might
be something like: HeaderText='<%# DataBinder.Eval(Container,
"DataItem.myVariable") %>' or HeaderText='<% Response.Write(myVariable); %>
But, neither worked, nor did several variations. I just want the headertext
to display myVariable which is declared as a string. Can anyone please
assist?
TIA,
John
header of some of these columns display a string that is generated from the
code behind (i.e. a dynamic header). How is this done?
I have tried with both a templatecolumn and boundcolumn. I thought it might
be something like: HeaderText='<%# DataBinder.Eval(Container,
"DataItem.myVariable") %>' or HeaderText='<% Response.Write(myVariable); %>
But, neither worked, nor did several variations. I just want the headertext
to display myVariable which is declared as a string. Can anyone please
assist?
TIA,
John