DevExpress / DevExtreme

HTML5 JavaScript Component Suite for Responsive Web Development
https://js.devexpress.com/
Other
1.8k stars 594 forks source link

Datagrid customsource Error while using DevExtreme.AspNet.Data #17548

Closed salemu01 closed 3 years ago

salemu01 commented 3 years ago

Steps to Reproduce:

  1. With an angular application, and devextreme@21.1 beta
  2. Use a datagrid, with custom datasource with DevExtreme.AspNet.Data as such:

____Typescript____

import { createStore } from 'devextreme-aspnet-data-nojquery';
import DataSource from 'devextreme/data/data_source';
.....
this.dataSource = new DataSource({
      store: createStore({
       ...
      }),
...

____HTML_____

  <dx-data-grid  [dataSource]="dataSource" ......./>

Results You Received:

Code working on 20.X versions, but on the beta version, we have the following javascript error:

core.js:6157 ERROR TypeError: CustomStore is not a constructor 
at createStore (index.js:398) 
at GridWidgetComponent.CreateDataSource (grid-widget.component.ts:148) 
at SafeSubscriber._next (grid-widget.component.ts:90) 
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183) 
at SafeSubscriber.next (Subscriber.js:122) 
at Subscriber._next (Subscriber.js:72) 
at Subscriber.next (Subscriber.js:49) 
at ReplaySubject._subscribe (ReplaySubject.js:61) 
at ReplaySubject._trySubscribe (Observable.js:42) 
at ReplaySubject._trySubscribe (Subject.js:81)

Results You Expected:

Instance of CustomStore created without issue. There seems to be a problem with package DevExtreme.AspNet.Data (devextreme-aspnet-data-nojquery) compatibility with the changes made in this beta version 21.1.

Environment Details:

Angular 11 Devextreme 21.1beta devextreme-aspnet-data-nojquery 2.8.2

AlekseyMartynov commented 3 years ago

Would you please check a fixed package? https://www.npmjs.com/package/devextreme-aspnet-data-nojquery/v/2.8.4

salemu01 commented 3 years ago

Hello, Thank you for you fast return. I will test this package and give you feedback.


From: AlekseyMartynov @.> Sent: Wednesday, May 19, 2021 11:11:15 AM To: DevExpress/DevExtreme @.> Cc: Surafel ALEMU @.>; Author @.> Subject: Re: [DevExpress/DevExtreme] Datagrid customsource Error while using DevExtreme.AspNet.Data (#17548)

Would you please check a fixed package? https://www.npmjs.com/package/devextreme-aspnet-data-nojquery/v/2.8.4https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fdevextreme-aspnet-data-nojquery%2Fv%2F2.8.4&data=04%7C01%7C%7C6f62a18bc1b34d9de7f908d91aa6103f%7C6401e761c1e64c0186095ac0771df56f%7C0%7C0%7C637570122803285070%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9Ilwh42XhV77Ot5H0f4UN7LaC1b2WuTbihjEmBehPHI%3D&reserved=0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDevExpress%2FDevExtreme%2Fissues%2F17548%23issuecomment-843908426&data=04%7C01%7C%7C6f62a18bc1b34d9de7f908d91aa6103f%7C6401e761c1e64c0186095ac0771df56f%7C0%7C0%7C637570122803295065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WPTeRwAqc4C72jzfDzLSKNnRjuKpXONzK1TSiZrQ8ZA%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAUDM5DSUPAYPEDL5ZLSW74DTON6DHANCNFSM45ASL42A&data=04%7C01%7C%7C6f62a18bc1b34d9de7f908d91aa6103f%7C6401e761c1e64c0186095ac0771df56f%7C0%7C0%7C637570122803295065%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NXkK1vob%2BaickEiAqrk3PR%2FtGdbSSIInmOj25tX%2B2i8%3D&reserved=0.

salemu01 commented 3 years ago

The problem has been fixed in this new 2.8.4 version.

Thank you AlekseyMartynov, and the devexpress team.