Add Text Box to RadGrid Column Group Header Server Side

0 Answers 128 Views
Ajax Grid
Jerry
Top achievements
Rank 2
Iron
Iron
Jerry asked on 18 Jan 2023, 09:58 PM

Trying to add a text box and button into a Column Group Header server side and can't seem to get to the cell of the specific header.  I know how to set the text and all but want to place controls into the header.

protected void RadGrid1_PreRender(object sender, EventArgs e)
{

foreach (GridColumnGroup cg in RadGrid1.MasterTableView.ColumnGroups)
{
if (cg.Name == "HeaderGroupName")
{
cg.HeaderText = "TEST";
}

}

}

Jerry
Top achievements
Rank 2
Iron
Iron
commented on 19 Jan 2023, 04:54 PM

Was able to do what I needed by injecting html into the cg.HeaderText property.  Interested to know if there is a better way?

No answers yet. Maybe you can help?

Tags
Ajax Grid
Asked by
Jerry
Top achievements
Rank 2
Iron
Iron
Share this question
or