Search Values in Gridview

6 posts, 0 answers
  1. Dongzhi
    Dongzhi avatar
    25 posts
    Member since:
    Jan 2014

    Posted 22 Jan 2014 Link to this post

    Is it possible to attach a search control to the gridview to find values that the user types in? Something like what Find does in MS Word.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 24 Jan 2014 Link to this post

    Hi,

    You can check the "Search as you type" WPF Demo as an example.

    I hope this helps.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. Dongzhi
    Dongzhi avatar
    25 posts
    Member since:
    Jan 2014

    Posted 11 Feb 2014 in reply to Dimitrina Link to this post

    The scenario I have is I'll have a custom grid control and wanted to attach a user control with a textbox and two buttons (Next and Previous) to the grid. As the user types it would highlight the rows and the user could use the next and previous buttons to go to the next highlight search. Something like the picture attached










  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Feb 2014 Link to this post

    Hi,

    The closest option we can offer you would be to check this blog post. It demonstrates how to filter the grid and highlight the matching texts. 

    You can also disable the filtering logic and keep just the highlighting.

    Regards,
    Didie
    Telerik

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

  5. Ram
    Ram avatar
    20 posts
    Member since:
    Nov 2014

    Posted 21 Feb 2015 in reply to Dimitrina Link to this post

    Hello Dimitrina,

    I looked at this blog and it is quite interesting. Could you show - how to disable filtering and only show highlighting?

    Does the same also work RadTreeListView control?

    Thanks
  6. Yoan
    Admin
    Yoan avatar
    1211 posts

    Posted 24 Feb 2015 Link to this post

    Hello Ram,

    I already answered your support ticket on the subject. For your convenience I will paste my answer here as well:
     
      1. You can achieve this functionality by simply removing the following line of code from the CustomFilterDescriptor class:
    Copy Code
    public CustomFilterDescriptor(IEnumerable<Telerik.Windows.Controls.GridViewColumn> columns)
            {
                this.compositeFilterDesriptor = new CompositeFilterDescriptor();
                this.compositeFilterDesriptor.LogicalOperator = FilterCompositionLogicalOperator.Or;
     
                foreach (GridViewDataColumn column in columns)
                {
                    this.compositeFilterDesriptor.FilterDescriptors.Add(this.CreateFilterForColumn(column));
                }
            }

    This will disable the filtering logic, however, the highlighting part will work.

     2. The filtering functionality will not work in the same way as in RadGridView, so I am afraid that you can not achieve it using our RadTreeListView.

    Regards,
    Yoan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top