Change the text of the bypass field

advertisements

I have a gridview :

<asp:GridView ID="gvReportingListeOF" runat="server" AutoGenerateColumns="false" Visible="false">

<Columns>

    <asp:BoundField DataField="cod_wo" HeaderText="N° OF" />
    <asp:BoundField DataField="cod_ref" HeaderText="Référence article" />
    <asp:BoundField DataField="lbl_article" HeaderText="Désignation article" />
    <asp:BoundField DataField="dat_sequence_wo" HeaderText="Séquence" />
    <asp:BoundField DataField="wo_qty" HeaderText="Qté prévue" />
    <asp:BoundField DataField="qty_revue" HeaderText="Qte revue" />

</Columns>

</asp:GridView>

And I wish changing dynamically the header text with code behind C#. It is possible ? Because they doesn't have ID...

Thanks


Try the above

gvReportingListeOF.Columns[ColumnIndex].HeaderText = "Header text"