This is a migrated thread and some comments may be shown as answers.

Problem with a column filter

3 Answers 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
George Saveliev
Top achievements
Rank 1
George Saveliev asked on 11 Jul 2011, 05:58 PM
Hello,

I have a problem with a column filter. Please see the following code:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
  
namespace GridTest1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
  
            List<Data> list = new List<Data>();
            list.Add(new Data() { Value = "A" });
            list.Add(new Data() { Value = "B" });
            list.Add(new Data() { Value = "C" });
            bindingSource1.DataSource = list;
        }
  
        private void btnChangeData_Click(object sender, EventArgs e)
        {
            List<Data> list = new List<Data>();
            list.Add(new Data() { Value = "A" });
            bindingSource1.DataSource = list;
        }
    }
  
    public class Data
    {
        public string Value { get; set; }
    }
}

The grid is bound to the BindingSource. The binding source is bound to a list. Initially a list contains 5 records. When I click the column filter, I see all 5 values there. Then I assign another list (with 3 records only) to the BindingSource's DataSource. The grid presents 3 rows. But when I click the column filter, it shows the previous 5 ones (please see the attached image).

This issue occurs in v.2011.1.11.315 and v.2011.1.11.427.

How should I "refresh" the filter in order to see the actual values only?

Thank you.

3 Answers, 1 is accepted

Sort by
0
George Saveliev
Top achievements
Rank 1
answered on 13 Jul 2011, 10:14 AM
I am sorry about mismatch of the code snippet and the following description. Initially the list contained 3 (not 5) records, then I changed it to the list with 1 (not 3)  record.

Thank you.
0
George Saveliev
Top achievements
Rank 1
answered on 13 Jul 2011, 07:38 PM
It seems this issue is fixed in v.2011.2.11.712.

Thank you.
0
Accepted
Svett
Telerik team
answered on 14 Jul 2011, 11:36 AM
Hi George,

The illustrated behavior is a known issue. I am glad to inform you that it has already been addressed in Q2 2011 which we have just released.

Best wishes,
Svett
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
George Saveliev
Top achievements
Rank 1
Answers by
George Saveliev
Top achievements
Rank 1
Svett
Telerik team
Share this question
or