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

Standard Filter setting?

3 Answers 134 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lovsten
Top achievements
Rank 1
Lovsten asked on 20 Sep 2007, 09:43 AM
The filter functionality is very new in the grid. But as default it is set to Equals. Is there a way to change this to be Contains as default?

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 20 Sep 2007, 12:57 PM
Hi Magnus,

Thanks for the feedback, we appreciate to hear your opinion on the filtering capabilities of RadGridView.

Regarding the default filter - unfortunately, we have not considered this feature before. Currently, the only solution is to go through the columns collection and set the filter function for each column.

The default filter function feature will be implemented in a future release. Your Telerik points have been updated for the suggestion.
 

Sincerely yours,
Evtim
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Lovsten
Top achievements
Rank 1
answered on 25 Sep 2007, 10:22 AM
OK. Can you give me a quick sample on how to loop through the columns to set this? Can't find the property for this.
0
Jack
Telerik team
answered on 25 Sep 2007, 04:00 PM
Hello Lovsten,

Here is an example how to set the filter function of all columns to Contains. You must iterate trough all columns, check whether they are instances of GridViewDataColumn and finally set their Filter.Function property to GridKnownFunction.Contains.

Please refer to the codeblock below:

foreach (GridViewColumn column in this.radGridView1.Columns)  
{  
    if (column is GridViewDataColumn)  
    {  
        ((GridViewDataColumn)column).Filter.Function = GridKnownFunction.Contains;  
    }  

I hope this helps.

Thank you for your time, and should you have any questions, please do not hesitate to contact us.

Regards,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Lovsten
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Lovsten
Top achievements
Rank 1
Jack
Telerik team
Share this question
or