Can I change RadGrid Headertext at runtime??

===================

Try the following code snippet to set the HeaderText of RadGrid at runtime.
CS:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)

{

if (e.Item is GridHeaderItem)

    {

        GridHeaderItem header = (GridHeaderItem)e.Item;

        header["ColumnUniqueName"].Text = "Header Text";

    } 

}

===================

After the HeaderText has been changed the column sorting is disabled in that column.

Is there a way to dynamically change the HeaderText but keep the column sorting?

===================

 

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
   {
       RadGrid1.MasterTableView.Columns[0].HeaderText = Name();
       RadGrid1.Columns[0].HeaderText = Name();
   }

 

from: http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-headertext.aspx

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-09-03
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2021-11-14
  • 2022-02-25
  • 2022-12-23
  • 2021-07-26
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案