Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

Initial implementation for dynamic data support through ExpandoObject

Open David-Moreira opened this issue 2 months ago • 3 comments

While it wasn't that hard to integrate the loading of data. I found it might be a bit limited regarding the edit operations. This is because due to the dynamic nature, we can't really figure out the Type of a particular field without having an actual structure.

This means that when editing: We need to infer from the actual item field type in order to know what input to render (numeric, checkbox, etc), so this means a nullable won't be easily figured out, if the value is null, there's no way you can tell which type would be in this particular field for example. So the TypeGetter method was updated to include the Item as a parameter to look into it. image

When creating: We need to override the NewItemCreator and provide the structure so the Grid can figure out the inputs to render, checkboxes, numeric, etc... image

What are your thoughts?

David-Moreira avatar May 12 '24 17:05 David-Moreira

While it wasn't that hard to integrate the loading of data. I found it might be a bit limited regarding the edit operations. This is because due to the dynamic nature, we can't really figure out the Type of a particular field without having an actual structure.

This means that when editing: We need to infer from the actual item field type in order to know what input to render (numeric, checkbox, etc), so this means a nullable won't be easily figured out, if the value is null, there's no way you can tell which type would be in this particular field for example. So the TypeGetter method was updated to include the Item as a parameter to look into it. image

When creating: We need to override the NewItemCreator and provide the structure so the Grid can figure out the inputs to render, checkboxes, numeric, etc... image

What are your thoughts?

If there is no other option I don't see any objections regarding this. As long as it doesn't affect the current work.

stsrki avatar May 13 '24 05:05 stsrki

Well, I believe, this is it. What do you think?

David-Moreira avatar May 13 '24 20:05 David-Moreira

Friendly reminder

David-Moreira avatar May 15 '24 20:05 David-Moreira