Unplanned
Last Updated: 20 Apr 2018 07:31 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 06 Apr 2018 10:21
Category: GridView
Type: Bug Report
2
FIX. RadGridView - TargetInvocationException when sorting the grid and rebinding in the SortChanged event while searching is being performed
To reproduce: run the attached sample project. 

Type "chef" in the search box and then try to sort some of the columns. Click the header cell several times and as a result the exception will occur.

Workaround:

        public class CustomGrid : RadGridView
        {
            public new object DataSource
            { 
                get
                {
                    return (object)base.DataSource;
                }
                set
                {
                    GridViewSearchRowInfo.Cancel = true;
                    Thread.Sleep(100);
                    base.DataSource = null;
                    this.EnableFiltering = false;
                    base.DataSource = value;
                    this.EnableFiltering = true;
                    base.CurrentRow = null; 
                }
            }
        }
0 comments