I am converting a page using asp:GridView to a RadGrid control and am having trouble with the latter's server side event DataBound. In the GridView, I have used the DataBound to alter the HeaderText of a particular column based on the value of a Session variable:
protected void scheduleGridView_DataBound(object sender, EventArgs e)
{
// Set the correct label on the data grid using session variable
if (clinTypeID == 1) //MD
{
scheduleGridView.Columns[0].HeaderText =
"MD";
}
else //CRNA
{
scheduleGridView.Columns[0].HeaderText =
"CRNA";
}}
Exactly the same code is used with the RadGrid:
protected void scheduleRadGrid_DataBound(object sender, EventArgs e)
{
// Set the correct label on the RadGrid using session variable
if (clinTypeID == 1) //MD
{
scheduleRadGrid.Columns[0].HeaderText =
"MD";
}
else //CRNA
{
scheduleRadGrid.Columns[0].HeaderText =
"CRNA";
}}
This does not work for the RadGrid. I set a breakpoint in this code and confirmed that the HeaderText value IS being changed. However, this is not reflected when the control is rendered. What could I be missing? Thanks!
Tom Stanley