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

Search Values in Gridview

5 Answers 267 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dongzhi
Top achievements
Rank 1
Dongzhi asked on 22 Jan 2014, 06:53 PM
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.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 24 Jan 2014, 09:42 AM
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 >>
0
Dongzhi
Top achievements
Rank 1
answered on 11 Feb 2014, 08:16 PM
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










0
Dimitrina
Telerik team
answered on 14 Feb 2014, 03:16 PM
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).

0
Ram
Top achievements
Rank 1
answered on 22 Feb 2015, 12:15 AM
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
0
Yoan
Telerik team
answered on 24 Feb 2015, 12:13 PM
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.

 
Tags
GridView
Asked by
Dongzhi
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Dongzhi
Top achievements
Rank 1
Ram
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or