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

Complete Custom Filtering Example

10 Answers 746 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 14 Mar 2019, 04:59 PM
Are there any links or code examples that the community could share that shows how to write totally custom column filters?

Better yet, add more content to the bottom of the existing filtering?  Grids in this application contain a custom table above the grid with columns that contain list boxes where the user can select one or more items (check boxes)?

Please see attached.

10 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 19 Mar 2019, 11:47 AM
Hi Reid,

Although that we do not have such example, you could take a look at the following dojo example, where the Grid is filtered with an external input element, using the "filter" method of the DataSource:
More complex scenarios and multiple components in the external filter could still use the same approach by creating complex filter expression with nested filters.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 19 Mar 2019, 08:44 PM

Hi Konstantin,

Thanks for that link but that approach is really the same as the external source that is use by our templates already (in the screen shot).  Too bad Kendo does not not support a template for that reason.  So we can have a custom row template, custom header template, etc.  Why not a custom Filter template?

0
Accepted
Konstantin Dikov
Telerik team
answered on 22 Mar 2019, 11:34 AM
Hi Reid,

The Grid provides option for customizing the filter cells:
columns.Bound(p => p.UnitsInStock).Width(100).Filterable(f=>f.Cell(c=>c.Template("myFilterCellTemplate")));

Detail information on the filter templates could be found in the following help topics for the jQuery widget, applicable for the Core wrapper as well:

Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 22 Mar 2019, 12:31 PM
Thank you for this.  I will take a look at the links.
0
Reid
Top achievements
Rank 2
answered on 22 Mar 2019, 12:32 PM
I just realized that that is a JavaScript approach.  I am using .NET Core MVC.  Are there any links showing an example of that?
0
Accepted
Konstantin Dikov
Telerik team
answered on 22 Mar 2019, 01:22 PM
Hi Reid,

We have online for customizing the filter with Menu filter mode:
For the "Row" mode you could use the "Filterable.Cell.Template", which could be set as shown in my last post. For the JavaScript handler used for initializing the custom filter you could refer to the jQuery documentation (which is applicable for the Core wrapper).


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Reid
Top achievements
Rank 2
answered on 27 Mar 2019, 11:43 AM
I marked that as the answer, thank you but actually I look forward to a solution where we can create a custom temp;ate for each column with custom content.  There are all sorts of templates that can be used (row, column, header etc.) but no Filter Template.
0
Konstantin Dikov
Telerik team
answered on 01 Apr 2019, 08:08 AM
Hello Reid,

Although that there is no "script" template option for the filtering of each column, using functions for the filter templates for each column allows creating entirely custom HTML. It is not a straight forward solution as the script templates, but it gives the same freedom for creating complex HTML for the filtering (with JavaScript or jQuery).


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Chris
Top achievements
Rank 1
answered on 16 Apr 2019, 11:50 PM

Also, looking for documentation on just the tag helpers for .net core for filtering for example.  in the intellisense it has a huge amount of options, but I can't find that in the documentation.  Where exactly is the reference for all of the options?  If you goto the docs and support link at the top of this page, it doesn't bring you any documentation whatsoever.  filtering just has a paragraph.  Not sure, where all the information is??

 

 

0
Konstantin Dikov
Telerik team
answered on 19 Apr 2019, 10:46 AM
Hello Chris,

You could refer to the following help topic for the filterable column options:
We are currently working on the MVC API reference, but the API reference of the Kendo UI Grid could be used as well, since the Grid for ASP.NET Core is a wrapper of the Kendo UI Grid.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Reid
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Reid
Top achievements
Rank 2
Chris
Top achievements
Rank 1
Share this question
or