문제

I want to change the back color of the header in radGridView.Is there any way to change except using themes for that?(winform)

도움이 되었습니까?

해결책

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;
        }
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top