Hi,
I'm trying to use search in syncfusion grid in VUE.
here is my grid:
<ejs-grid ref='grid' id='grid' :dataSource="mmydata" :allowPaging='true' :allowSorting ='true' :sortSettings='initialSort' :pageSettings='pageSettings' :editSettings='editSettings' :toolbar='toolbar' :actionBegin='actionBegin' :searchSettings='searchOptions' :allowExcelExport='false' :toolbarClick='toolbarClick' :actionFailure='actionFailure' :contextMenuItems="contextMenuItems" >
<e-columns>
<e-column field='id' :lockColumn='true' :allowEditing='false' :visible='false' :isPrimaryKey='true' headerText='מזהה' width='100' textAlign='center' ></e-column>
<e-column field='contract_id' headerText='שם המכרז' width='150' textAlign='right' :fields='cFields' editType='dropdownedit' :edit='editparams1' :dataSource='ccListdata' foreignKeyValue='contractName' foreignKeyField='id' :validationRules='requiredRule'></e-column>
<e-column field='item_num' headerText='#סעיף' width='150' textAlign='right' :validationRules='requiredRule'></e-column>
<e-column field='item_unit_id' headerText='יחידת מידה' width='150' textAlign='right' :fields='iuFields' editType='dropdownedit' :edit='editparams2' :dataSource='iiuListdata' foreignKeyValue='unitDescription' foreignKeyField='id' :validationRules='requiredRule'></e-column>
<e-column field='description' headerText='תאור' width='200' textAlign='right' :validationRules='requiredRule'></e-column>
<e-column field='quantity' headerText='כמות' width='150' textAlign='right'></e-column>
<e-column field='item_price' headerText='עלות ליחידה' width='150' textAlign='right'></e-column>
<e-column field='item_type_id' headerText='סוג פריט' width='150' textAlign='right' :fields='itFields' editType='dropdownedit' :edit='editparams3' :dataSource='iitListdata' foreignKeyValue='typeDescription' foreignKeyField='id' :validationRules='requiredRule'></e-column>
</e-columns>
</ejs-grid>
also i defined:
searchOptions: { fields: ['item_num', 'description'], operator: 'equal'},
my grid has 3 columns which are ForeignKey value loaded via ODataAdaptor, the main grid is WebApiAdaptor:
created() {
this.ccListdata = new DataManager({headers: [{"X-CSRF-Token": csrf_token}],url: '/contracts/?listOnly=1&',adaptor: new ODataAdaptor(), crossDomain: true});
this.iiuListdata = new DataManager({headers: [{"X-CSRF-Token": csrf_token}],url: '/itemunits/?listOnly=1&',adaptor: new ODataAdaptor(), crossDomain: true});
this.iitListdata = new DataManager({headers: [{"X-CSRF-Token": csrf_token}],url: '/itemtypes',adaptor: new ODataAdaptor(), crossDomain: true});
this.mmydata = new DataManager(this.mydata);
},
computed: {
mydata: function() {
let $ak = {headers: [{"X-CSRF-Token": this.getCsrfTOken()}],url: serviceURL+this.mycid, adaptor: new WebApiAdaptor()};
return $ak;
},
},
unfutunatly when i issue a search i see in the dev tools that the search is forwared to the urls of the foreignkey columns and not to the url of the grid
http://127.0.0.1:8000/contracts/?listOnly=1&&$filter=(tolower(cast(contractName,%20%27Edm.String%27))%20eq%20%27121%27)
http://127.0.0.1:8000/itemunits/?listOnly=1&&$filter=(tolower(cast(unitDescription,%20%27Edm.String%27))%20eq%20%27121%27)
http://127.0.0.1:8000/itemtypes/?$filter=(tolower(cast(typeDescription,%20%27Edm.String%27))%20eq%20%27121%27)
Please Help me fix this annoying issue.
Sami