Search code examples
c#odatatelerik-gridblazor

transform the Grid state to an OData4-compatible string


I'm using blazor with telerik ui for blazor i wanted to know if there is a way to transform telerik grid data to an odata compatible data to perform filter and ...


Solution

  • Our engineering team has been working on the odata scenario. You can see an example on GitHub here: https://github.com/telerik/blazor-ui/tree/master/grid/odata

    • You need a Telerik UI for Blazor version >=2.3.0 or later to get the OData formatting of the grid state (its ToODataString() extension method is in the Telerik.Blazor.ExtensionMethods namespace).
    • To get the grid state and to provide the data to the grid, you must use the manual operations of the grid.
    • You need a model for the grid data and an envelope for the response object. The response model (envelope) must have System.Text.Json.Serialization.JsonPropertyName attributes set to point to the OData fields in the response.

    Please give the GitHub sample a try, if you're still having trouble submit a support ticket so our engineering team can address the problem and incorporate any changes, feedback or bug fixes into the product.