Set filter values are not displayed in filter controls

8 posts, 1 answers
  1. jbssa
    jbssa avatar
    6 posts
    Member since:
    Sep 2010

    Posted 30 Sep 2010 Link to this post

    Hi,

    I using a DataGrid to display some data and want to set the FilterExpression value, to define a default filter. The filter is applied correct (only row that matches are displayed). However, the filter values are NOT displayed in the filter controls. So the user does not see which filters are applied to the data.
    I also tried to set the filter function and value on a per column base with the CurrentFilterFunction and CurrentFilterValue property on a GridColumn, but the values are not reflected in the filter controls either.

    Is this a desired behavior or a bug?

    lG
    Jens

  2. Pavlina
    Admin
    Pavlina avatar
    5285 posts
    Member since:
    Sep 2012

    Posted 30 Sep 2010 Link to this post

    Hi Jens,

    I have followed your scenario and prepared a simple working project which handles the desired functionality. You can find it attached to this message. Please examine it and let me know if it helps.

    Kind regards,
    Pavlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  3. jbssa
    jbssa avatar
    6 posts
    Member since:
    Sep 2010

    Posted 30 Sep 2010 Link to this post

    Thanks for your reply Pavlina. I reviewed your code and adopted it to my project. So I have to set the filter with FilterExpression to filter the right values and then I have to assign each column its filter value respecting the value of FilterExpression to display it in the filter control.

    Is there any way to achieve the same behavior by simply assigning FilterExpression (filter the data and display the correct values in the filter controls), because I only have the FilterExpression. If there is no way I've to write a whole Facade to splitting the FilterExpression in individual columns and assigning the correct values and filter functions to the columns according to its data type ...

    lG
    Jens

  4. Pavlina
    Admin
    Pavlina avatar
    5285 posts
    Member since:
    Sep 2012

    Posted 30 Sep 2010 Link to this post

    Hi Jens,

    I recommend that you go through the following help topic:
    Applying default filter on initial load

    Best wishes,
    Pavlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  5. jbssa
    jbssa avatar
    6 posts
    Member since:
    Sep 2010

    Posted 01 Oct 2010 Link to this post

    Hi Pavlina,

    I've read the topic and it's still the same problem. To achieve data filtering and display of filter values in the grid I've to set the FilterExpression AND CurrentFilterValue/CurrentFilterFunction per column. As I only have the FilterExpression (and applying the FilterExpression only filter the data but does not display the filter values), I've to write own logic to interpret the FilterExpression to apply CurrentFilterValue and CurrentFilterFunction to the appropriate columns.

    The question is, is NOT displaying the filter values in the grid by setting FilterExpression an expected behavior?

    lG
    Jens

  6. Answer
    Pavlina
    Admin
    Pavlina avatar
    5285 posts
    Member since:
    Sep 2012

    Posted 06 Oct 2010 Link to this post

    Hello,

    The described behavior is expected. Note that the FilterExpression is property of the RadGrid control, but CurrentFilterFunction and CurrentFilterValue are properties of the GridColumn object. Therefore you need to use them if you want filter values to appear in the filter text box.

    you should use
    Kind regards,
    Pavlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  7. jbssa
    jbssa avatar
    6 posts
    Member since:
    Sep 2010

    Posted 07 Oct 2010 Link to this post

    Hi Pavlina,

    thanks for your response. I've restructured my logic, so that, in addition to the FilterExpression, the CurrentFilterFunction and CurrentFilterValues are saved and loaded by the program. This makes the object model for storing the values a little bit more complex, but it's better than concatenating FilterExpression and the various Filter functions and values of each single column.

    Anyway thanks for your help :-)

    lG
    Jens

  8. Ramsey Callaway
    Ramsey Callaway avatar
    1 posts
    Member since:
    Aug 2009

    Posted 23 Feb 2012 Link to this post

    Could you please post your code?  I am trying to achieve a similar result.

Back to Top