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

DataGrid: More control over edit template #3700

Closed
WolfgangKluge opened this issue Apr 9, 2022 · 6 comments
Closed

DataGrid: More control over edit template #3700

WolfgangKluge opened this issue Apr 9, 2022 · 6 comments
Labels
Status: Not Planned Type: Feature ⚙ Request or idea for a new feature.

Comments

@WolfgangKluge
Copy link
Contributor

I'd like to have a way to manipulate the rendering of the edit form of a DataGrid..

Think of something like a (scholar) dictionary where the words and other parts like genus or numerus should be side by side and are grouped together (if there's not enough space).

The rendering should be something like this:

Caption 1:
[input field 1]
Caption 2a:
[input field 2a]
Caption 2b:
[input field 2b]
Caption 3a:
[input field 3a]
Caption 3b:
[input field 3b]

or on smaller devices:

Caption 1:
[input field 1]
Caption 2a:
[input field 2a]
Caption 3a:
[input field 3a]
Caption 2b:
[input field 2b]
Caption 3b:
[input field 3b]

Other use cases involve colspan (as also shown above) or might want to group some fields together...

So, basically I need a way to customize _DataGridRowEdit.razor.

As a workaround, I use "Edit-Only"-Columns and empty columns so it behaves more or less like I want.

@WolfgangKluge WolfgangKluge added the Type: Feature ⚙ Request or idea for a new feature. label Apr 9, 2022
@stsrki
Copy link
Collaborator

stsrki commented Apr 9, 2022

Have you tried PopupFieldColumnSize parameter on a DataGridColumn?

@WolfgangKluge
Copy link
Contributor Author

WolfgangKluge commented Apr 9, 2022

Frankly, since I use the EditMode.Form, I didn't considered that..

This might help, but could not solve all the problems I have (in my example you would render 1, 2a, 2b, 3a, 3b on small devices where I want 1, 2a, 3a, 2b, 3b).
Ok, maybe with css order... hmm

@WolfgangKluge
Copy link
Contributor Author

As expected, PopupFieldColumnSize seems to work in Popup-Mode only (but there it's a viable option to control the layout).

@stsrki
Copy link
Collaborator

stsrki commented Apr 10, 2022

Not sure if we would introduce a new EditFormFieldColumnSize for Form mode. Or a more generic EditFieldColumnSize that would handle both popup and form modes.

@David-Moreira
Copy link
Contributor

I am a bit conflicted also... maybe we'll have new edit modes in the future? We never know haha, kinda more In favor of the generic version, and eventually deprecate the previous. Which of course would not do anything in Inline mode.

@WolfgangKluge
Copy link
Contributor Author

Maybe a more common approach could be to a Custom-EditMode instead of everything configurable.

In that case I could simply create a new Modal for that, if there would be an entry point - but I guess there are more use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Not Planned Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants