How to disable query builder component

Hello,

I have a requirement where I want to open the form in view mode. Hence I need to disable the complete query builder component, so that user can't modify any rule.

How can I achieve that.?

Thanks,

Sanjay


1 Reply

YA YuvanShankar Arunagiri Syncfusion Team May 31, 2022 07:59 AM UTC

Hi Sanjay,


We have validated your reported query and prepared the sample based on your requirement. We can achieve your requirement by using the readonly property of the query builder. Please refer the below code snippet and the API link.


API link: https://ej2.syncfusion.com/angular/documentation/api/query-builder/#readonly


[app.component.html]:


<ejs-querybuilder #querybuilder class="row" [dataSource]="dataSource" [rule]="importRules" (created)="createdControl()" [readonly]="true">


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

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


Regards,

Yuvan Shankar A


Loader.
Up arrow icon