Applying Filter

1 posts, 0 answers
  1. Erdem
    Erdem avatar
    1 posts
    Member since:
    Jun 2014

    Posted 14 Dec 2018 Link to this post

    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?

     

Back to Top