Get Telerik Grid columns Header Text
-
28-09-2019 - |
Question
I need to rename my grid headertext. My grid generate using autogenerated columns.i am getting data in Datatable and assigning it to grid. after assigning to grid i am using a function which called after databind() and it format the grid cells but not HeaderText.
Can anybody help me out for this problem?
foreach (GridColumn column in grdTestCertificate.Columns)
{
string[] strColumn = column.HeaderText.Split('|');
column.HeaderText = strColumn[1];
}
it return 0 counts of columns.
Solution
aah i got the solutions,
foreach (GridColumn column in grdTestCertificate.MasterTableView.RenderColumns)
{
column.HeaderText = "";
}
grdTestCertificate.rebind();
Point up my answer if you got your solution.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow