protected void Grid_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
//Set Grid Column Headers
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
header["ColumnUniquName"].Text = "Header Titile";
}
}
There may be some requirements from your client, "This column name should be changed when you are inserting an item to the grid".... So how do you do that... simple as this.
protected void Grid_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
//Set Grid Column Headers
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
if (this.Grid.MasterTableView.IsItemInserted)
{
header["ColumnUniquName"].Text = "Header Titile Changed";
}
else
{
header["ColumnUniquName"].Text = "Header Titile";
}
}
}
Hope this helps.....
No comments:
Post a Comment