0
在RowFormatting事件中,在運行時在Telerik WinForms RadGridView中設置行的背色是否有一些技巧?我可以在此事件中設置RowElement.Font,但不能在RowElement.BackColor中設置。我已經在調試器中加入了代碼,並確定該行正在執行(事件已正確「連線」)。在RowFormatting事件中設置Telerik RadGridView(WinForms)中的RowElement.BackColor
void grid_RowFormatting(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e)
{
if (e.RowElement.RowInfo.Cells["CODE"].Value.ToString() == "X"))
{
// the following line is executed but has no apparent effect
e.RowElement.BackColor = System.Drawing.Color.Aqua;
}
}
:感謝您的信息! – Tim