Completed
Last Updated: 03 Dec 2014 08:32 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 19 Feb 2014 07:50
Category: GridView
Type: Bug Report
1
IMPROVE. RadGridView - Custom filtering performance for a grid with 1000+ rows
To reproduce: use the code from our demo application for Custom Filtering. Instead of Customers table, bind the grid to Orders or another table with 1000+ rows.

Resolution: You can surround the row operation in Begin/EndUpdate(false) and remove the InvalidateRow method. The Custom Filtering example in our demo Application is updated for better performance or you can use the following code snippet: 

For example:


        private void radGridView1_CustomFiltering(object sender, Telerik.WinControls.UI.GridViewCustomFilteringEventArgs e)
        {

            if (string.IsNullOrEmpty(this.radTextBox1.Text))
            {
                this.radGridView1.BeginUpdate();
                e.Visible = true;
                for (int i = 0; i < this.radGridView1.ColumnCount; i++)
                {
                    e.Row.Cells[i].Style.Reset();
                  
                }
                //e.Row.InvalidateRow();
                this.radGridView1.EndUpdate(false);
                return;
            }

            this.radGridView1.BeginUpdate();
            e.Visible = false;
            for (int i = 0; i < this.radGridView1.ColumnCount; i++)
            {
                string text = e.Row.Cells[i].Value.ToString();
                if (text.IndexOf(this.radTextBox1.Text, 0, StringComparison.InvariantCultureIgnoreCase) >= 0)
                {
                    e.Visible = true;
                    e.Row.Cells[i].Style.CustomizeFill = true;
                    e.Row.Cells[i].Style.DrawFill = true;
                    e.Row.Cells[i].Style.BackColor = Color.FromArgb(201, 252, 254);
                }
                else
                {
                    e.Row.Cells[i].Style.Reset();
                    
                }
            }
            //e.Row.InvalidateRow();
            this.radGridView1.EndUpdate(false);
        }

2 comments
ADMIN
Stefan
Posted on: 26 Sep 2014 07:37
Currently, we do not have a time frame for this feature. If you follow this item, once it is completed you will receive an notification email.
Raffaele
Posted on: 17 May 2014 07:39
no solutions yet?