Custom Search Control- not sure how to proceed

1 Answer 46 Views
Filter General Discussions Grid GridLayout
Bill
Top achievements
Rank 1
Iron
Iron
Bill asked on 28 Nov 2022, 03:07 PM

I have a custom component (SearchRow) that is bound to a custom SearchParameter class. SearchParameter has IEnumerables for Fields ("Width", etc) and Operations ("Less than") as well as user-entered values. The idea being you'd select a field, an operation and enter a comparison value and that will all get passed to a service for a custom search against the database. I want to create a search bar that will be a user-addable (user clicks "Add Parameter" and a new row shows up) list of SearchRows bound to a collection of SearchParameters. Honestly I want it to look a lot like the Filter control but it seems like the Filter control is meant to act against a set of already-loaded data in a grid and I can't do that here as the searchable dataset is huge and I have to use the SearchParameter data to convert that into custom sql. 

Is the best way to do this to have a Grid in edit mode with a single column consisting of my SearchRow component and add to them and bind to them using OnRead? 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 01 Dec 2022, 07:34 AM

Hi Bill,

Actually, this statement is not true:

>> the Filter control is meant to act against a set of already-loaded data

The Filter component generates filter expressions (we call them FilterDescriptors). You can serialize these descriptors and send them to the server to fetch only the data you need.

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Filter General Discussions Grid GridLayout
Asked by
Bill
Top achievements
Rank 1
Iron
Iron
Answers by
Dimo
Telerik team
Share this question
or