Completed
Last Updated: 28 Apr 2020 16:40 by ADMIN
Release 2.13.0
ben
Created on: 28 Apr 2020 15:22
Category: Grid
Type: Feature Request
0
Save, Load, Grid State -- Do not Depend on Custom Serialize Method

Currently I need to define a custom JsonConverter to serialize the state of the grid.  I would prefer not to have to do this, however I understand that may just be the way things are for now.  Creating this ticket / issue to track if this is ever changed to not being needed.

For now I'll be setting up two serializers, one just for the grids that uses Newtonsoft, and the one I would prefer to use that uses System.Text.Json, https://github.com/Blazored/LocalStorage.

From https://docs.telerik.com/blazor-ui/components/grid/state 

// to store the serialized grid state, we need to have a custom serialized // based on Newtonsoft.Json serialization. In the future this may not be required public class FilterDescriptorJsonConverter : JsonConverter {

///rest omitted

}

 

1 comment
ADMIN
Marin Bratanov
Posted on: 28 Apr 2020 16:40

Hi Ben,

When we created the grid state, it was impossible to serialize it in any other way. Since then, the System.Text.Json serializer evolved a bit and allowed us to do some things. With our upcoming 2.13.0 release, Newtonsoft.Json and a custom converter won't be needed.

I made the change in the docs so it is ready and waiting for the release, and you can preview it in this commit: https://github.com/telerik/blazor-docs/commit/d86862a2fbb12d487941a3306f1f3e94cd23b5c7.

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.