I need to sort the values in a multiple select filter. I found the following http://dojo.telerik.com/IsOTA
But it is not working for me. I only need to sort one filter. It fails on the container.empty() line because filterMultiCheck is null. I can NOT understand why it is null. I've inspected the objects in the DOM and everything seems to be there.
My code is slightly different from the example. The grid is created on a cshtml page and the FilterMenuInit is call as so:
The page is rendered before the FilterMenuInit is called so I just don't get it.
Any help is appreciated.
7 Answers, 1 is accepted
Doing the following, I can get the unique values and sort them in the column I want filtered. How can I make the uniqueVals js array the datasource for the filter?
We have another demo which shows another approach which may be cleaner and more convenient for you. You could initialize the Kendo UI Grid column with its own filterable data source. If it is separate from the grid but shared between columns, sort and get the unique values as shown in the demo at:
UI for ASP.NET MVC API Reference: http://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridBoundColumnFilterableBuilder
*check DataSource or BindTo
I am sorry to hear that you are finding the Multi-check filters challenging to work with.
The built-in behaviour uses the Kendo UI Grid data source as is if one is not provided. There is an option to provide a separate custom data source which can be sorted in the desired sort order. The custom multi-check filter for Grid for UI for ASP.NET MVC should resemble the below configuration:
Regarding the difficulty with finding items, we have considered that may happen when there are many items and added a search option because "search trumps navigation" in such cases.
You may take advantage of it by setting Search(true):
Finally, regarding implementing built-in sort of the Kendo UI Grid MultiCheck filters data source, it is something which could be subject to change after a review of the team and customer demand. Our roadmap and priorities depend largely on the business value and customer demand for specific components and features.
It is an enhancement which I see as reasonable and valuable, however, I cannot guarantee an estimated implementation timeframe.
We have a Feature Acceleration program which allows a customer to negotiate a certain component or functionality to be implemented on demand or sooner than our roadmap implies. Feature acceleration fits well in scenarios where a feature or enhancement is important for an application's success, but it is not planned to be available at the time of the application's completion.
After reviewing the requirements I can suggest checking our runnable example demonstrating how to have a filter menu with sorted and distinct items. Please have in mind that the example is using a Trial DLL for security reasons, and once it is downloaded the DLL has to be changed with a valid one:
I hope this example will help to achieve the desired result.