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

Set filter values are not displayed in filter controls

7 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jbssa
Top achievements
Rank 1
jbssa asked on 30 Sep 2010, 07:48 AM
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

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 30 Sep 2010, 09:01 AM
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
0
jbssa
Top achievements
Rank 1
answered on 30 Sep 2010, 09:12 AM
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
0
Pavlina
Telerik team
answered on 30 Sep 2010, 10:23 AM
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
0
jbssa
Top achievements
Rank 1
answered on 01 Oct 2010, 08:28 AM

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

0
Accepted
Pavlina
Telerik team
answered on 06 Oct 2010, 03:59 PM
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
0
jbssa
Top achievements
Rank 1
answered on 07 Oct 2010, 06:53 AM
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
0
Ramsey Callaway
Top achievements
Rank 1
answered on 23 Feb 2012, 06:14 PM
Could you please post your code?  I am trying to achieve a similar result.
Tags
Grid
Asked by
jbssa
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
jbssa
Top achievements
Rank 1
Ramsey Callaway
Top achievements
Rank 1
Share this question
or