Completed
Last Updated: 28 Jun 2016 12:28 by ADMIN
ADMIN
George
Created on: 24 Feb 2014 09:31
Category: PropertyGrid
Type: Bug Report
0
FIX. RadPropertyGrid - filtering when the items are ordered alphabetically, grouped and the scrollbar is at the bottom causes exception
To reproduce:

Add a RadPropertyGrid to a form.  Use the following code:

this.radPropertyGrid1.SortOrder = System.Windows.Forms.SortOrder.Ascending;
this.radPropertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Categorized;

As a workaround you can manually scroll to the top before performing a filtering operation:

public class MyPropertyGrid : RadPropertyGrid
{
    protected override PropertyGridElement CreatePropertyGridElement()
    {
        return new MyPropertyGridElement();
    }
}
 
public class MyPropertyGridElement : PropertyGridElement
{
    protected override PropertyGridToolbarElement CreateToolbarElement()
    {
        return new MyPropertyGridToolbarElement();
    }
 
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(PropertyGridElement);
        }
    }
}
 
public class MyPropertyGridToolbarElement : PropertyGridToolbarElement
{
    protected override void ExecuteSearch()
    {
        this.PropertyGridElement.PropertyTableElement.Scroller.Scrollbar.Value = 0;
        base.ExecuteSearch();
    }
}
0 comments