Completed
Last Updated: 05 Jun 2014 07:08 by Svetlin
Svetlin
Created on: 20 Jan 2011 03:21
Category: GridView
Type: Feature Request
1
ADD When conditional formatting is applied, the selected row should not be affected.
If you create conditional formatting, the rows that obey the rule should not be affected if they are selected.
To support this formatting the format.ApplyOnSelectedRows property must be set to false.
Test project:
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace Lab.Grid
{
public partial class GridConditionalFormattingForm : Form
{
private RadGridView gridView = new RadGridView();
public GridConditionalFormattingForm()
{
InitializeComponent();
gridView.Dock = DockStyle.Fill;
gridView.Parent = this;
gridView.MultiSelect = true;
DataTable data = new DataTable();
data.Columns.Add("ID");
data.Columns.Add("Name");
data.Rows.Add(1, "Name1");
data.Rows.Add(2, "Name2");
data.Rows.Add(1, "Name3");
data.Rows.Add(4, "Name4");
data.Rows.Add(1, "Name5");
gridView.DataSource = data;
}
protected override void OnLoad(System.EventArgs e)
{
base.OnLoad(e);
ConditionalFormattingObject format = new ConditionalFormattingObject("MyCondition", ConditionTypes.Equal, "1", "", true);
format.CellBackColor = Color.Red;
format.ApplyOnSelectedRows = false;
gridView.Columns[0].ConditionalFormattingObjectList.Add(format);
}
}
}
0 comments