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

Applying Filter

0 Answers 76 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Erdem
Top achievements
Rank 1
Erdem asked on 14 Dec 2018, 02:58 PM

I am using Q1 2008 Winforms.

There is radgridview named 'gv'. gv is filling with some manipulated data. I can filter by clicking and selecting some values. I want to filter wiht my own buttons. Basicially i created filter like this:(c#)

01.private void btFilter3_Click(object sender, EventArgs e)
02.{
03.    gridTest.EnableFiltering = true;
04.    this.gridTest.FilterDescriptors.Remove("IssueDate");
05.    FilterDescriptor filter = new FilterDescriptor();
06.    filter.PropertyName = "IssueDate";
07.    filter.Operator = FilterOperator.IsGreaterThan;
08.    filter.Value = DateTime.Now.AddMonths(-5);        
09.    filter.IsFilterEditor = true;
10.    this.gridTest.FilterDescriptors.Add(filter);
11.}

 

By clicking the button code is running. On Screen; the date value  (what i described above) is appearing on filter area. But data on the gv isn't filtering.

When i filter with another value(date) manually, gv is filtering. After that manually process when run code by clicking the button, code is running and data on the gv is filtering also.

I need filter without manually process. 

What am i missing?

 

No answers yet. Maybe you can help?

Tags
DataFilter
Asked by
Erdem
Top achievements
Rank 1
Share this question
or