All docs
V19.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - Access the DataSource

Regardless of the data source you use, the List always wraps it in the DataSource. To get the instance of the DataSource, call the getDataSource() method.

jQuery
JavaScript
var listDataSource = $("#listContainer").dxList("getDataSource");
Angular
TypeScript
import { ..., ViewChild } from "@angular/core";
import { DxListModule, DxListComponent } from "devextreme-angular";
// ...
export class AppComponent {
    @ViewChild(DxListComponent, { static: false }) list: DxListComponent;
    // Prior to Angular 8
    // @ViewChild(DxListComponent) list: DxListComponent;
    listDataSource: any = {};
    getDataSource () {
        this.listDataSource = this.dataGrid.instance.getDataSource();
    }
}
@NgModule({
    imports: [
        // ...
        DxListModule
    ],
    // ...
})

Now, you can call any method exposed by the DataSource. For example, you can reload data using the load() method.

JavaScript
listDataSource.load();
See Also