我想更改 radGridView 中标题的背面颜色。除了使用主题之外,还有什么方法可以更改?(winform)
问问题
1131 次
1 回答
1
private void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement is GridHeaderCellElement)
{
if (e.CellElement.Text == "Your header cell text") //checking for the text in header cell
{
e.CellElement.DrawBorder = true;
e.CellElement.DrawFill = true;
e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
e.CellElement.BackColor = Color.Green;
e.CellElement.ForeColor = Color.Red;
}
}
}
于 2013-10-07T07:38:12.783 回答