Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation for dynamic data support through ExpandoObject #5507

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

David-Moreira
Copy link
Contributor

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 David-Moreira requested a review from stsrki May 12, 2024 17:04
@David-Moreira David-Moreira linked an issue May 12, 2024 that may be closed by this pull request
@stsrki
Copy link
Collaborator

stsrki commented May 13, 2024

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.

@David-Moreira
Copy link
Contributor Author

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

@David-Moreira
Copy link
Contributor Author

Friendly reminder

Copy link
Collaborator

@stsrki stsrki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to create a separate test page in the Demo project. And also add unit test(s).

Demos/Blazorise.Demo/Pages/Dashboard.razor Outdated Show resolved Hide resolved
Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs Outdated Show resolved Hide resolved
@David-Moreira David-Moreira requested a review from stsrki May 23, 2024 20:17
@stsrki
Copy link
Collaborator

stsrki commented Jun 3, 2024

There are conflicts now.

@David-Moreira
Copy link
Contributor Author

There are conflicts now.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataGrid : Dynamic Data Support
2 participants