Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Set filter values are not displayed in filter controls

Answered Set filter values are not displayed in filter controls

Feed from this thread
  • jbssa avatar

    Posted on Sep 30, 2010 (permalink)

    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

    Reply

  • Pavlina Pavlina admin's avatar

    Posted on Sep 30, 2010 (permalink)

    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

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • jbssa avatar

    Posted on Sep 30, 2010 (permalink)

    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

    Reply

  • Pavlina Pavlina admin's avatar

    Posted on Sep 30, 2010 (permalink)

    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

    Reply

  • jbssa avatar

    Posted on Oct 1, 2010 (permalink)

    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

    Reply

  • Answer Pavlina Pavlina admin's avatar

    Posted on Oct 6, 2010 (permalink)

    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

    Reply

  • jbssa avatar

    Posted on Oct 7, 2010 (permalink)

    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

    Reply

  • Ramsey Callaway avatar

    Posted on Feb 23, 2012 (permalink)

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

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Set filter values are not displayed in filter controls
Related resources for "Set filter values are not displayed in filter controls"

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]