To reproduce
- create a form with a RadPropertyGrid.
- set ToolbarVisible to true
- add some properties, but not enough to cause the scrollbar to appear.
- start and click on the sort button: the sort is changed, but the scroll bar became visible even if it is not needed.
Workaround:
public class MyPropGrid : RadPropertyGrid
{
protected override PropertyGridElement CreatePropertyGridElement()
{
return new MyPropGridElement();
}
public override string ThemeClassName
{
get { return typeof(RadPropertyGrid).FullName; }
set { }
}
}
public class MyPropGridElement : PropertyGridElement
{
protected override PropertyGridSplitElement CreateSplitElement()
{
return new MyPropGridSplitElement();
}
protected override Type ThemeEffectiveType
{
get { return typeof(PropertyGridElement); }
}
}
public class MyPropGridSplitElement : PropertyGridSplitElement
{
protected override PropertyGridTableElement CreateTableElement()
{
return new MyPropGridTableElemnet();
}
protected override Type ThemeEffectiveType
{
get { return typeof(PropertyGridSplitElement); }
}
}
public class MyPropGridTableElemnet : PropertyGridTableElement
{
protected override void UpdateScrollers(UpdateActions updateAction)
{
this.Scroller.UpdateScrollRange();
}
protected override Type ThemeEffectiveType
{
get { return typeof(PropertyGridTableElement); }
}
}