Telerik Forums
UI for JSP Forum
0 answers
24 views

I'm trying to determine how to specify a custom list of operators for a specific column using the JSP grid. The documentation isn't helping, as it just states that it's the same configuration as for Jquery - https://docs.telerik.com/kendo-ui/api/jsp/grid/column-filterable#operators

I've tried to enter in a JSON string, but it's not working:

<kendo:grid-column-filterable operators="enums: {
		eq: 'Equal to',
		neq: 'Not equal to',
		contains: 'Contains',
		doesnotcontain: 'Does Not Contain',
		isnotempty: 'Is not empty',
		isempty: 'Is empty'
	}"
>

If I could just see an example of what it should look like I could take it from there. Alternatively, I wouldn't mind trying to configure a new data type for the column specifically, but that's unfortunately not working either.

$(document).ready(function() {
    kendo.ui.FilterMenu.fn.options.operators.objectCollection = {
  	      eq: "Equal to",
  	      neq: "Not equal to",
  	      contains: "Contains",
  	      doesnotcontain: "Does Not Contain",
  	      isnotempty: "Is not empty",
  	      isempty: "Is empty"
    };
    kendo.ui.Filter.fn.options.operators.objectCollection = {
		  eq: "Equal to",
		  neq: "Not equal to",
		  contains: "Contains",
		  doesnotcontain: "Does Not Contain",
		  isnotempty: "Is not empty",
		  isempty: "Is empty"
    };
});
<kendo:dataSource-schema-model-field name="pivotedCollectionColumn" type="objectCollection"/>

 

To clarify, my use case is the display of a collection of objects. A mapping table of ManyToMany. My grid displays the parent as a single record, so my column is keyed to a special field that is performing pivoting of the collection values for a comma-delimited single-row display: "value1, value2, value3". I have everything working server-side for my filtering, accounting for the proper collection de-referencing. It's just a matter of the "enums" type that I'm currently using only has eq, neq, isnull, and isnotnull. I need the operators I've shown previously. Even currently, my server-side code is converting the null operators to empty operators, since those are what I actually utilize.

Curtis
Top achievements
Rank 1
 asked on 18 Nov 2023
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?