Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Does the Filtering API allow filtering using the predefined customConditions
posted

Is it possible to enable or disable customConditions filters via the filtering API?  I have several columns with customConditions defined (Example Below) but do not see any way to apply these with the API.  

 Ex Colum Filter Definition:

	{ columnKey: "classification", condition: "doesNotEqual", allowFiltering: true, customConditions:
		{
			Unclassified: { key: 'Unclassified', 'Unclassified', expressionText: "Unclassified", filterFunc: function (value) {  return value.includes("Unclassified"); } },
			ClassA: { key: 'ClassA', labelText: 'ClassA', expressionText: "AccountChanges", filterFunc: function (value) { return value.includes("ClassA"); } },
			ClassB: { key: 'ClassB', labelText: 'ClassB', expressionText: "ZeroAmount", filterFunc: function (value) {  return value.includes("ClassB"); } }
		}
	}

Does the API offer any way for me to enable one of the above filters?  I only see a way to define a new filter via the API as shown below.

$("#Grid").igGridFiltering("filter", ([{ fieldName: "classification", expr: "ClassA", cond: "equal" }]), true); 

Thanks in advance!

Regards,
Matt

Parents Reply Children
No Data