This is a migrated thread and some comments may be shown as answers.

[Solved] Setting Detail Table Column Headers

2 Answers 176 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith Harrison
Top achievements
Rank 1
Keith Harrison asked on 30 Nov 2009, 05:11 PM
I typically set the column headers for a grid via the code behind:
this.dgMaster.Columns[COL_CONTRACT_HEADER].HeaderText = ApplicationTerm.GetApplicationTerm(MODULE, "txtContractNumber");

How can I use this same technique to set the headers in the DetailTableView?
If I set them in the bind event for the detail items, it works fine....until I expand another row, at which point the new row is fine but all the headers disappear from the other expanded rows.

Thank you in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 01 Dec 2009, 09:51 AM
Hello Keith,

Try out the following code and see if it helps meet your requirement:
c#:
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    {   
       RadGrid1.MasterTableView.DetailTables[0].GetColumn("ColumnUniqueName").HeaderText = "Custom Text"
    } 

Thanks
Princy.
0
Keith Harrison
Top achievements
Rank 1
answered on 01 Dec 2009, 01:39 PM
Exactly what I wanted. Thank you very much.
Tags
Grid
Asked by
Keith Harrison
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Keith Harrison
Top achievements
Rank 1
Share this question
or