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

GridColumnGroup Header Text Change at Runtime

2 Answers 225 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 19 Apr 2014, 07:03 PM
Hi All, Just wondering on how can I change the value of my GridColumnGroup Header Text at Runtime? Reason is that the Header text needs to be changed based on variable being passed, and some header is date based.

Thanks in advance,
Rj

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 21 Apr 2014, 05:44 AM
Hi,

Please try the following code snippet to set the GridColumnGroup HeaderText from code behind:

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
 RadGrid1.MasterTableView.ColumnGroups.FindGroupByName("GroupName").HeaderText = "Some Text";
 RadGrid1.Rebind();
}

Thanks,
Shinu
0
RJ
Top achievements
Rank 1
answered on 21 Apr 2014, 12:22 PM
Thanks a lot Shinu
Tags
Grid
Asked by
RJ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
RJ
Top achievements
Rank 1
Share this question
or