New to KendoReact? Learn about KendoReact Free.
useODataDataSource<T>
A specialized version of useRemoteDataSource tailored for working with OData services. It automatically handles the construction of OData queries and the processing of OData responses.
tsx
interface Product {
ProductID: number;
ProductName: string;
UnitPrice: number;
}
const dataSource = useODataDataSource<Product>({
take: 10,
skip: 0,
transport: {
read: {
url: 'https://demos.telerik.com/kendo-ui/service-v4/odata/Products'
}
},
schema: {
model: {
id: 'ProductID'
}
}
});
Parameters
props
The configuration options for the OData data source.
Returns
An object containing all the properties and methods from useRemoteDataSource with OData-specific defaults for transport and schema configurations.