Standard Filter setting?

4 posts, 0 answers
  1. Lovsten
    Lovsten avatar
    72 posts
    Member since:
    Aug 2007

    Posted 20 Sep 2007 Link to this post

    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?
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 20 Sep 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lovsten
    Lovsten avatar
    72 posts
    Member since:
    Aug 2007

    Posted 25 Sep 2007 Link to this post

    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.
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 25 Sep 2007 Link to this post

    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
Back to Top