Posted on: 2/23/2013 6:38:30 PM | Views : 962

Hello,
I'm just starting with ASP.net and I want to rename the header of a datagrid dynamically. In my case the column contains the stock value but it could be the local or central stock. The datagrid haves code like this:
<div id="productlist"> <asp:DataGrid ID="dgProducts" runat="server" ShowFooter="true" CellPadding="4" GridLines="Both" AutoGenerateColumns="False" Width="100%" CssClass="producttable"> <Columns> <asp:BoundColumn DataField="ProdRowId" HeaderText="ProdRowId" Visible="False"></asp:BoundColumn> <asp:TemplateColumn> <HeaderTemplate> <asp:Label ID="lblHdrStock" CssClass="center" resourcekey="LocalStock" ...

Go to the complete details ...