Completed
Last Updated: 08 Jun 2015 15:15 by ADMIN
ADMIN
Hristo
Created on: 26 Mar 2015 16:06
Category: GridView
Type: Bug Report
1
FIX. RadGridView - scrolling is slow when formatting is applied with ExpressionFormattingObject
Version 2014.3.1202.40 scrolling worsened

How to reproduce:
 public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            DataTable dataTable = new DataTable();
            dataTable.Columns.Add("Id", typeof(int));
            dataTable.Columns.Add("Id2", typeof(int));
            dataTable.Columns.Add("Id3", typeof(int));
            dataTable.Columns.Add("Id4", typeof(int));

            for (int i = 0; i < 10000; i++)
            {
                dataTable.Rows.Add(i, i + 10, i +20, i+30);
            }

            this.radGridView1.DataSource = dataTable;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

            this.Load += Form1_Load;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            ExpressionFormattingObject idObj = new ExpressionFormattingObject("1", "Id % 2 = 0", false);
            idObj.CellBackColor = Color.SkyBlue;
            idObj.CellForeColor = Color.Red;
            this.radGridView1.Columns["Id"].ConditionalFormattingObjectList.Add(idObj);

            ExpressionFormattingObject idObj2 = new ExpressionFormattingObject("1", "Id2 % 2 = 0", false);
            idObj2.CellBackColor = Color.LightGray;
            idObj2.CellForeColor = Color.Red;
            this.radGridView1.Columns["Id2"].ConditionalFormattingObjectList.Add(idObj2);

            ExpressionFormattingObject idObj3 = new ExpressionFormattingObject("1", "Id3 % 2 = 0", false);
            idObj3.CellBackColor = Color.LightGreen;
            idObj3.CellForeColor = Color.Red;
            this.radGridView1.Columns["Id3"].ConditionalFormattingObjectList.Add(idObj3);

            ExpressionFormattingObject idObj4 = new ExpressionFormattingObject("1", "Id4 % 2 = 0", false);
            idObj4.CellBackColor = Color.LightYellow;
            idObj4.CellForeColor = Color.Red;
            this.radGridView1.Columns["Id4"].ConditionalFormattingObjectList.Add(idObj4);
        }
    }

Workaround: 
Apply formatting on CellFormatting event
0 comments