Completed
Last Updated: 07 Aug 2024 15:11 by ADMIN
Release 2024.3.806 (2024 Q3)

Add a RadFilterView and a RadGridView. Associate the two controls and add programmatically FilterDescriptors to the RadFilterView control. The UI doesn't show any filtering applied. 

        Me.RadFilterView1.FilterViewElement.LoadCategoriesAsync = False
        Me.RadGridView1.DataSource = Me.ProductsBindingSource
        Me.RadGridView1.EnableFiltering = True
        Me.RadGridView1.ShowFilteringRow = False


        AddHandler Me.RadFilterView1.FilterChanged, AddressOf Me.RadFilterView1_FilterChanged
        AddHandler Me.RadFilterView1.FilterViewElement.CategoryCreating, AddressOf Me.FilterViewElement_CategoryCreating
        AddHandler Me.RadFilterView1.FilterViewElement.CategoryCreated, AddressOf Me.FilterViewElement_CategoryCreated

        Me.RadFilterView1.AssociatedControl = Me.RadGridView1

       
        Dim filter As New FilterDescriptor With {
            .PropertyName = "ProductID",
            .Operator = FilterOperator.IsLessThanOrEqualTo,
            .Value = 5,
            .IsFilterEditor = True
        }

        Dim filter2 As New FilterDescriptor With {
            .PropertyName = "CategoryID",
            .Operator = FilterOperator.IsLessThanOrEqualTo,
            .Value = 4,
            .IsFilterEditor = True
        }
        Me.RadFilterView1.FilterDescriptors.AddRange(filter, filter2)

Completed
Last Updated: 13 Mar 2024 08:49 by ADMIN
Release 2024.1.312
This event works for FilterViewTextCategoryElement, but not for FilterViewBooleanCategoryElement.
Private Sub Filter_CategoryCreating(sender As Object, e As FilterViewCategoryCreatingEventArgs)
   AddHandler DirectCast(e.Category, FilterViewBooleanCategoryElement).ItemCreated, AddressOf BoolCategoryItemCreated
Thanks
Completed
Last Updated: 18 Jul 2023 14:26 by ADMIN
Release R2 2023 SP1

In some themes the clear filter ellipse button is visible, nevertheless, no filter is applied.

It is observable in ControlDefault, Office2010Silver, Office2007Black, Office2007Silver, and Windows7.

As a workaround, you can consider using one of our latest themes: Fluent for example.

Completed
Last Updated: 23 Mar 2023 07:39 by ADMIN
Release R1 2023 SP1
Selecting items from the  FilterViewCheckedDropDownCategoryElement drop-down will freeze the application.
Unplanned
Last Updated: 15 Feb 2023 12:54 by ADMIN
Clear filter operation tools longer than expected when a large number of items are used to filter the control.
Unplanned
Last Updated: 15 Feb 2023 12:50 by ADMIN
Any changes to the DataSource of the AssociatedControl won't be reflected after setting it initially.
Unplanned
Last Updated: 08 Feb 2023 14:42 by ADMIN
When the collection contains null values and an exception will be thrown when using the FilterViewCheckedDropDownCategoryElement category.
Unplanned
Last Updated: 30 Dec 2022 08:52 by ADMIN

Use the following code and press the arrow of the spin editor for the Price category in RadFilterView:

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("Price", typeof(decimal));
            for (int i = 0; i < 10; i++)
            {
                dt.Rows.Add(i,"Item"+i, null);
            }

            this.radGridView1.DataSource = dt;
            this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radFilterView1.AssociatedControl = this.radGridView1;

The following error occurs:

Completed
Last Updated: 10 Jun 2022 08:44 by ADMIN
Release R2 2022 SP1

Use the following code snippet

        public RadForm1()
        {
            InitializeComponent();

             DataTable dt = new DataTable();
            for (int i = 0; i < 20; i++)
            {
                dt.Columns.Add("col" + i, typeof(string));
            }
            for (int i = 0; i < 10; i++)
            {
                DataRow r = dt.NewRow();
                foreach (DataColumn col in dt.Columns)
                {
                    r[col.ColumnName] = Guid.NewGuid().ToString();
                }
                dt.Rows.Add(r);
            }
            this.radFilterView1.DataSource = dt;
        }

 

You will notice that after running the project, the vertical scrollbar is missing:

Workaround:

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e); 
            MethodInfo mi = typeof(RadFilterViewElement).GetMethod("UpdateScrollbars", BindingFlags.Instance | BindingFlags.NonPublic);
            mi.Invoke(this.radFilterView1.FilterViewElement, new object[] { this.radFilterView1.FilterViewElement.ElementsPanel.Size });
        }

An extended workaround that covers the case for updating the scrollbar at run time is demonstrated here:

        private void radFilterView1_CategoryCreated(object sender, Telerik.WinControls.UI.FilterView.FilterViewCategoryCreatedEventArgs e)
        {
            e.Category.ExpandedChanged += Category_ExpandedChanged;
            e.Category.Expanded = false;

        }

        private void Category_ExpandedChanged(object? sender, EventArgs e)
        {
            // You need pass the control to Windows main loop to perform the pending telerik events after property Expanded change in order to resize internally
            // the StackLayoutPanel Containers before calling UpdateScrollBars
            Application.DoEvents();
            // Now your code
            MethodInfo mi = typeof(RadFilterViewElement).GetMethod("UpdateScrollbars", BindingFlags.Instance | BindingFlags.NonPublic);
            mi.Invoke(this.radFilterView1.FilterViewElement, new object[] { this.radFilterView1.FilterViewElement.ElementsPanel.Size });
            // Hide the horizontal scrolll bar
            radFilterView1.FilterViewElement.HorizontalScrollBar.Visibility =ElementVisibility.Collapsed;
        }
 

Completed
Last Updated: 06 Jun 2022 09:30 by ADMIN
Release R2 2022 (LIB 2022.2.606)

Use the following code snippet which result is illustrated in the gif file:

        public RadForm1()
        {
            InitializeComponent();

            DataTable dt = new DataTable();
            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("Column1", typeof(decimal));
            dt.Columns.Add("Column2", typeof(string));
            dt.Columns.Add("Column3", typeof(string));
            for (int i = 0; i < 10; i++)
            {
                //No delay
                //dt.Rows.Add(i, 100, "LongstringAAAAAA" + i, "VeryVeryLongstringAAAAAAAABBBBBBBBVeryVeryLongstringAAAAAAAABBBBBBBBE" + i);

                //Long delay
                dt.Rows.Add(i, 10000, "LongstringAAAAAA" + i, "VeryVeryLongstringAAAAAAAABBBBBBBBVeryVeryLongstringAAAAAAAABBBBBBBBE" + i);
            }

            this.radFilterView1.DataSource = dt;
        }

Workaround:

        private void radFilterView1_CategoryCreating(object sender, Telerik.WinControls.UI.FilterView.FilterViewCategoryCreatingEventArgs e)
        {
            FilterViewNumericCategoryElement numericCategory = e.Category as FilterViewNumericCategoryElement;
            if (numericCategory!=null)
            {
                numericCategory.DisplayMode = FilterViewNumericCategoryMode.SpinEditors;
            }
        }

Completed
Last Updated: 14 Oct 2021 16:30 by ADMIN
Release R3 2021 SP1

To reproduce:

this.radGridView1.EnableFiltering = true;
this.radGridView1.BestFitColumns();

DataTable dt = new DataTable();    
dt.Columns.Add(new DataColumn("Column 1", Type.GetType("System.Decimal")));
dt.Columns.Add(new DataColumn("Column 2", Type.GetType("System.Decimal")));
dt.Columns.Add(new DataColumn("Column 3", Type.GetType("System.String")));

for (int i = 0; i < 20; i++)
{
    dt.Rows.Add(0, i, "Text " + i);
}

this.radGridView1.DataSource = dt;
this.radFilterView1.AssociatedControl = this.radGridView1;

Run the project and filter the first column ("Column 1") by dragging radFilterViews radTrackBar.

You will get the following exception: "System.ArgumentOutOfRangeException: 'Value of '1' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'."