In your case, you can subscribe to the ViewCellFormatting of the RadGridView. Inside the vent handler, you can check the e.CellElement property for GridRowHeaderCellElement. Then you could customize the cell per your requirement. Here you could also set the Text property of the row header cell.
privatevoidRadGridView1_ViewCellFormatting1(object sender, CellFormattingEventArgs e)
{
if (e.CellElement is GridRowHeaderCellElement )
{
e.CellElement.Text = "C1";
e.CellElement.ForeColor = Color.Blue;
}
}
As for getting the text of a specific row header cell, you can use the following code.
var cellContent = this.radGridView1.TableElement.VisualRows[0].VisualCells[0].Text;
I hope that you find this information helpful.
Regards,
Dinko
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.