0
我有一个简单的RadGridView,在第一个单元格内我有Checkbox
其中我想更改我的行的颜色,如果此Checkbox
处于选中状态并返回到原始颜色if此Checkbox
处于未选中状态。RadGridView更改单元格后的行颜色CheckBox选中/取消选中
目前这是我尝试和这画我的行时,我的Checkbox
检查,但我如何更改为原始颜色时,我的Checkbox
未选中?
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
if ((bool)e.RowElement.RowInfo.Cells["Select"].Value == true)
{
e.RowElement.DrawFill = true;
e.RowElement.GradientStyle = GradientStyles.Solid;
e.RowElement.BackColor = Color.SkyBlue;
}
else
{
e.RowElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.RowElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
}
}
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/row-selection/defaultcs.aspx请参阅此。 – rach
我需要看什么? (我是新开发者...) – user3599192
参考该链接并查看该链接页面下示例中的代码 – rach