Add a custom field with only few specific rules to QueryBuilder

Hello,

I would like to ask you if there is any way to add a custom input field with limited rules to QueryBuilder? For example, I would like to add a field called Fruits, which should be a MultiSelect and add only two rules "in" and "not in".

I am using the QueryBuilder component v. 20.1.55 on our client side.

Be


1 Reply

YA YuvanShankar Arunagiri Syncfusion Team June 1, 2022 04:33 AM UTC

Hi Ignacy,


We have validated your reported query and achieve your requirement by using the operators property of the query builder column. Please refer the below code snippet and UG link.


UG link: https://ej2.syncfusion.com/angular/documentation/query-builder/columns/#operators


[app.component.html]:


<e-column field="EmployeeID" label="Employee ID" type="number" [operators]=Operators></e-column>


[app.component.ts]:

Operators = [

        { value: 'in', key: 'In' },

        { value: 'notin', key: 'Not In' }

    ];


Could you please check the above code and get back to us, if you need any further assistance on this. 


Sample link: https://stackblitz.com/edit/angular-3zkrn9?file=app.component.html


Regards,

Yuvan Shankar A


Loader.
Up arrow icon