In KendoUI Builder, we mention about Service URI and Catalog URI. REST service is also created using Progress App Server.
How to display Progress RDBMS data in KendoUI for Angular(4)?
1 Answer, 1 is accepted
0
Dimiter Topalov
Telerik team
answered on 05 Apr 2018, 12:38 PM
Hello Saurabh,
In general the Kendo UI for Angular components that support data binding (like the Grid, Charts, and DropDowns) are agnostic to where their data comes from and can be bound to plain arrays, special DataResult object (for the Grid) or Observables (via the async pipe). Further details about various data binding approaches are available in the respective sections of our documentation:
The Grid emits events like pageChange, sortChange and filterChange that contain the required information for issuing a remote request that will obtain the necessary processed data set (in server-side data operations scenarios). If the whole data set is available on the client, it can be processed accordingly with the Data Query process() function.
The most convenient approach for handling all data operations in a single place is utilizing the DataStateChange event that combines all other data operations-related events, and provides a State object containing all paging, sorting, filtering and grouping descriptors as event data.
The Grid also provides directives for automatic binding that abstract away all processing of the data:
To sum up - you can utilize any backend that returns a JSON containing the data (and for paging purposes - the total number of data items) and create a custom Angular data service for communicating with this backend by issuing the appropriate requests. The general workflow is as follows:
1) The end user interacts with the Grid by sorting, filtering, paging or grouping via the UI
2) The dataStateChange event is emitted with the respective skip, take, sort, filter, and group properties that reflect the current state change
3) In the event handler the respective method of the Angular data service, responsible for fetching the data from the remote server is called and the State is passed to it
public dataStateChange(state: DataStateChangeEvent): void {
this.state = state;
this.service.query(state);
}
4) In the data service fetch method a HTTP request to the remote back end is performed and the response is processed to match the format, expected by the Grid
5) The Grid is updated to display the incoming processed data set
In this example, the Grid is directly bound to the Observable, coming from the data service:
<kendo-grid
[data]="view | async"...
constructor(private service: CategoriesService) {
this.view = service;
this.service.query(this.state);
}
Currently we do not have a runnable demo that features a Grid bound to a REST service, created by the Progress App Server, but one of the teams is working on enhancing the Kendo UI Builder with the feature to generate Angular (4/5+) applications too, so you can expect this in the near future. Meanwhile, as previously described, you can create a custom Angular data service that can communicate with any backend and bind the Grid to it - it can display any data collection.
Let us know if you have any additional questions related to the Kendo UI for Angular components.