To reproduce: I want to add multiple items to a filter expression using the Is in list operator. It seems it is space delimited. For example, I want to filter for 'In Progress' and 'Late'. However, when I apply the filter it creates this 'In', 'Progress', and 'Late'. Workaround: Currently, the possible solution that I can suggest is to use underscores to separate the words , e.g. "In_Progress".
When setting the DataFilter.Expression property to an expression that contains negative values, the DataFilter ignores that condition.
Please refer to the attached sample project.
Workaround:To reproduce: set the DataSource property and enable the sorting for the fields drop-down items: Me.RadDataFilter1.SortOrder = SortOrder.Descending Me.RadDataFilter1.SortFieldNames = True When you activate the drop-down editor to select a field name, you will notice that the items are always sorted ascending no matter the SortOrder. Note: RadDataFilter should allow you to sort the drop-down items in descending order. Workaround: Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load AddHandler Me.RadDataFilter1.EditorInitialized, AddressOf EditorInitialized End Sub Private Sub EditorInitialized(sender As Object, e As Telerik.WinControls.UI.TreeNodeEditorInitializedEventArgs) Dim editor As TreeViewDropDownListEditor = TryCast(e.Editor, TreeViewDropDownListEditor) If editor IsNot Nothing Then Dim element As BaseDropDownListEditorElement = TryCast(editor.EditorElement, BaseDropDownListEditorElement) element.ListElement.SortStyle = Telerik.WinControls.Enumerations.SortStyle.Descending End If End Sub
Please refer to the attached screenshot illustrating what filter expressions and groups are added. As a result, an incorrect RadDataFilter.Expression is produced. RadDataFilter either must always contain a valid expression or indicates somehow when the current expression is not valid.
The error message appears when opening the custom option from the filter icon in RadGridView.
The error message should not appear as there is a text in the textbox. When the enter key is pressed, the textbox value is still not committed which leads to this error. As a workaround, we can create a custom CompositeDataFilterForm override the ProcessCmdKey where we can handle this case.
public class MyCompositeDataFilterForm : CompositeDataFilterForm
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.Enter)
{
this.Controls[2] as RadButton).Focus();
(this.Controls[2] as RadButton).PerformClick();
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e)
{
var newForm = new MyCompositeDataFilterForm();
e.Dialog = newForm;
}
Both editors have the same type - TreeViewDropDownListEditor and there is no way to tell for which one the event is fired.
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; } }