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

[HxMultiSelectGridColumnInternal] Support multi-select display in last column #1033

Open
Arnnes opened this issue Mar 7, 2025 · 7 comments

Comments

@Arnnes
Copy link

Arnnes commented Mar 7, 2025

In some cases I need to display a column with checkboxes as the last column instead of the first. I will create a pull request to add this feature.

@hakenr
Copy link
Member

hakenr commented Mar 7, 2025

@Arnnes How will the API look like?

@Arnnes
Copy link
Author

Arnnes commented Mar 7, 2025

@hakenr For HxMultiSelectGridColumnInternal, I would like to add a parameter (probably a boolean) to indicate whether it should be the last column. Then, the GetColumnOrder method would look like this: protected override int GetColumnOrder() => IsLastGridColumn ? int.MaxValue : int.MinValue;. I'm not yet sure how to integrate this into HxGrid.

@hakenr
Copy link
Member

hakenr commented Mar 7, 2025

Ad-hoc brainstorming:

  • <HxGrid MultiSelectColumnOrder="99" />
  • <HxGrid MultiSelectColumnPlacement="GridMultiSelectColumnPlacement.Start|End" />
  • allow placing <HxMultiSelectGridColumn /> wherever you need to <Columns> section (when not found and multi-selection is enabled, the column is automatically added as first column)

@crdo @jirikanda Opinions / ideas?

@crdo
Copy link
Member

crdo commented Mar 7, 2025

+1 for <HxGrid MultiSelectColumnPlacement="GridMultiSelectColumnPlacement.Start|End" />

@jirikanda
Copy link
Contributor

+1 for allow placing <HxMultiSelectGridColumn /> wherever you need

@Arnnes
Copy link
Author

Arnnes commented Mar 7, 2025

<HxGrid MultiSelectColumnPlacement="GridMultiSelectColumnPlacement.Start|End" /> is sufficient for my case (at least for now). However, I am not against to allowing to be placed wherever you need, though. @hakenr your thoughts?

@hakenr
Copy link
Member

hakenr commented Mar 7, 2025

TBH, I'm not a big fan of adding numerous tiny parameters to configure subtle component behavior. It clutters the API and makes future improvements and adjustments harder (especially with breaking changes).

So, I prefer allowing explicit column usage while automatically adding it when not found:

  • Allow placing <HxMultiSelectGridColumn /> anywhere in the <Columns> section. If not found and multi-selection is enabled, the column is automatically added as the first column.

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

No branches or pull requests

4 participants