Custom Field In Template

Hi,

I'm tring to use template to build custom rule, with custom fields and operators. 


ss1.jpg

In result i need every property in here including "Bananas Id". The result is missing that:


ss2.jpg


Is it possible to achieve this with QueryBuilder component ?


I've prepared simple sample and attached it. 

Thanks in advance.


Attachment: QueryBuilder1_af81dda3.zip

1 Reply 1 reply marked as answer

YA YuvanShankar Arunagiri Syncfusion Team April 25, 2022 03:17 PM UTC

Hi Halit,


We have prepared a sample based on your requirement. please find the sample attachment.

For you reference, please refer below code snippet.

categoryObj = new ej.dropdowns.DropDownList({

                        // other code here

                         change: function (e) {

                             var ruleElement = ej.base.closest(e.element, '.e-rule-container');

                             var index = 0;

                             while (ruleElement && ruleElement.previousElementSibling !== null) {

                                 ruleElement = ruleElement.previousElementSibling;

                                 index++;

                             }

                             qryBldrObj.rule.rules[index].custom = { Category: { Id: e.value } };

                        }

                     });


Please get back to us if you need further assistance


Regards,

YuvanShankar A


Attachment: SyncfusionTemplate_28c8ffda.zip

Marked as answer
Loader.
Up arrow icon