Change HeaderText for GridTableView inside a GridTableView

3 posts, 0 answers
  1. Antonio
    Antonio avatar
    1 posts
    Member since:
    Aug 2013

    Posted 03 Mar 2014 Link to this post

    Hello, i have a GridTableView inside a GridTableView and i want to change the Column Header Text Dynamically (Server Side), the aspx is as follow:

    <telerik:RadGrid ID="rgdProducts" runat="Server" AutoGenerateColumns="False" ...>
    <MasterTableView Name="MasterTable" AutoGenerateColumns="True" ...>
        <telerik:GridTableView Name="NumDetailTable" AutoGenerateColumns="True" ...>
            <telerik:GridTableView Name="UOMDetailTable" AutoGenerateColumns="False" ...>
                 <telerik:GridBoundColumn UniqueName="SortOrder" HeaderText="Sort Order">

    Hope anyone can help me, Thanks.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Mar 2014 in reply to Antonio Link to this post

    Hi Antonio,

    Please try the following code snippet to set the HeaderText of a detail table.

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
      if ((e.Item is GridHeaderItem) && (e.Item.OwnerTableView.Name == "UOMDetailTable"))
        GridHeaderItem headerItem = e.Item as GridHeaderItem;
        LinkButton button = headerItem["SortOrder"].Controls[0] as LinkButton;
        button.Text = "New HeaderText";

  3. Manuel Buendia
    Manuel Buendia avatar
    6 posts
    Member since:
    Mar 2011

    Posted 23 Aug 2018 in reply to Princy Link to this post

    Gracias @Princy

Back to Top