We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cascading DropDownList - Error: DataManager - executeLocal() : A query is required to execute

I am having trouble configuring a cascading DropDownList following the doc at https://ej2.syncfusion.com/angular/documentation/drop-down-list/how-to/cascading/#configure-the-cascading-dropdownlist.  VS Code indicates an error at this.standardNoteObj.query (copied below the code snip).  When I run the app and select from the noteGroupList I get an error in the debug console as well (part of this is also copied below the ts error).  Can you tell me where I am going wrong?  I am using Angular 7 if this matters.

@ViewChild('noteGroupList')
public noteGroupObj: DropDownListComponent;
@ViewChild('standardNoteList')
public standardNoteObj: DropDownListComponent;
public onChangeNoteGroup(): void {
this.standardNoteObj.enabled = true;
// query the data source based on country DropDownList selected value
const tempQuery: Query = new Query().where('noteGroup', 'equal', this.noteGroupObj.value);
this.standardNoteObj.query = tempQuery;
// clear the existing selection.
this.standardNoteObj.text = null;
// bind the property changes to state DropDownList
this.standardNoteObj.dataBind();
}

[ts]
Type 'import("..../node_modules/@syncfusion/ej2-data/src/query").Query' is not assignable to type 'import("..../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-data/src/query").Query'.
  Types of property 'dataManager' are incompatible.
    Type 'import("..../node_modules/@syncfusion/ej2-data/src/manager").DataManager' is not assignable to type 'import("..../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-data/src/manager").DataManager'.
      Types of property 'ready' are incompatible.
        Type 'Promise<import("..../node_modules/@syncfusion/ej2-base/src/ajax").Ajax>' is not assignable to type 'Promise<import("..../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-base/src/ajax").Ajax>'.
          Type 'import("..../node_modules/@syncfusion/ej2-base/src/ajax").Ajax' is not assignable to type 'import("..../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-base/src/ajax").Ajax'.
            Types have separate declarations of a private property 'options'. [2322]
(property) PCallerNoteComponent.standardNoteObj: DropDownListComponent

Debugger console error:

PCallerNoteComponent.html:31 ERROR Error: DataManager - executeLocal() : A query is required to execute
Error: DataManager - executeLocal() : A query is required to execute
    at Function.push../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-data/src/util.js.DataUtil.throwError (util.js:506)
    at DataManager.push../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-data/src/manager.js.DataManager.executeLocal (manager.js:110)
    at Query.push../node_modules/@syncfusion/ej2-data/src/query.js.Query.executeLocal (query.js:80)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js.DropDownBase.setListData (drop-down-base.js:389)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js.DropDownBase.resetList (drop-down-base.js:659)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js.DropDownList.updateDataSource (drop-down-list.js:1831)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/drop-down-base/drop-down-base.js.DropDownBase.setUpdateInitial (drop-down-base.js:687)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/src/drop-down-list/drop-down-list.js.DropDownList.onPropertyChanged (drop-down-list.js:1848)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-base/src/base.js.Base.dataBind (base.js:103)
    at DropDownListComponent.push../node_modules/@syncfusion/ej2-dropdowns/node_modules/@syncfusion/ej2-base/src/component.js.Component.dataBind (component.js:139)
    at viewWrappedDebugError (core.js:19000)
    at callWithDebugContext (core.js:22777)
    at Object.debugHandleEvent [as handleEvent] (core.js:22470)
    at dispatchEvent (core.js:19122)
    at core.js:20612
    at SafeSubscriber.schedulerFn [as _next] (core.js:12621)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:196)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:134)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:77)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:54)


3 Replies

VK Vinoth Kumar Sundara Moorthy Syncfusion Team April 4, 2019 05:34 AM UTC

Hi Scott, 
 
Thank you for contacting Syncfusion support. 
 
Based on your provided details, we suspect that the cause of the reported issue is due to the installation of duplicate packages in your application. In general, duplicate package will be installed when there is any version mismatch between the packages. Please follow the steps specified in below UG documentation to resolve this issue in your end. 
 
 
Could you please run the sample after updating package as specified in the above documentation and get back to us with more information if you still face the issue or need any further assistance on this? 
 
Regards, 
Vinoth Kumar S 



SE Scott Eaton April 4, 2019 09:17 PM UTC

Works!  I found ej2-ng-dropdowns, as well as ej2-angular-dropdowns, installed.  I uninstalled ej2-ng-dropdowns and updated as specified in the doc and everything works as expected.

Thank you,
SE


PO Prince Oliver Syncfusion Team April 5, 2019 04:07 AM UTC

Hello Scott, 

Thank you for the update. We are glad that the issue is resolved in your end. 

Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon