Unplanned
Last Updated: 19 Dec 2017 17:14 by ADMIN
ADMIN
Dimitar
Created on: 12 Dec 2017 07:03
Category: DataFilter
Type: Bug Report
0
FIX. RadDataFilter - exception when the expression contains a field that is not added to the data filter control.
Use attached to reproduce. 


Workaround:
class MyDataFilter : RadDataFilter
{
    protected override RadTreeViewElement CreateTreeViewElement()
    {
        return new MyDataFilterElement();
    }
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadDataFilter).FullName;
        }
    }
}
class MyDataFilterElement : RadDataFilterElement
{
    protected override IVirtualizedElementProvider<RadTreeNode> CreateElementProvider()
    {
        return new MyProvider(this);
    }
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadDataFilterElement);
        }
    }
}
class MyProvider : DataFilterElementProvider
{
    public MyProvider(RadTreeViewElement treeViewElement) : base(treeViewElement)
    { }
    public override IVirtualizedElement<RadTreeNode> CreateElement(RadTreeNode data, object context)
    {
        try
        {
            return base.CreateElement(data, context);
        }
        catch
        {
            RadMessageBox.Show("Invalid expression");
        }
        return null;
    }
   
}
Attached Files:
0 comments