BlazorGrid
BlazorGrid copied to clipboard
Feature requests
This control looks interesting, it seems very responsive. There are a few things missing, however, that I would require before considering switching. I hope you can implement some of these in the future.
- Paging - virtualization is great, but sometimes a pager is preferable
- Per-column filtering
- Column drag and drop to rearrange
- Column selection, so columns can be shown/hidden
- The ability to read/set the column statue (column order, visible status, sort order, filters)
- Toolbar for top of grid, and button columns that work with the context of the row they appear on
Thank you for your suggestions. I will evaluate those for future versions.
What do mean by "button columns"? Do you have an example?
What do mean by "button columns"? Do you have an example?
The ability to have a column that contains buttons, and if you click the button, an event can fire with the parameter as the item that the row represents. For example, a "delete" button, which we can have fire a DeleteListItem(object listItem), so we can add a button to delete an item in the grid, and it will pass that item in its event.
This should already be possible. For example, you could define a button column like so:
<StaticGridCol FitToContent="true" AlignRight="true">
<button class="button" @onclick:stopPropagation="true" @onclick="() => DeleteListItem(context)">Delete</button>
</StaticGridCol>
Update: I've added an example to the docs, please have a look https://blazorgrid.z6.web.core.windows.net/examples/buttons
- Paging - virtualization is great, but sometimes a pager is preferable
Definitely this feature will makes this component much better and more user friendly
I would like to add one more feature request if possible
Ability to Select /Deselect a Row / Multiple rows [ Either by checkbox or by different CSS for selected rows ]
@NessfertIndia have you checked the Row highlighting example? Maybe this is what you are looking for
Row highlighting is allowing selection of 1 row . Any way to make this multi selection and Can we highlight / differentiate between selected rows and non selected rows visually
@elylv I have revisited this issue and gone through your suggestions in more detail to consider them for implementation, however I feel that all of these are beyond the scope of a "light weight" component.
For example:
- Per-column filtering: since we focus on displaying remote data, all we could do here is pass on information to the server side. This is something you can already do in the Provider delegate anyway.
- Column drag & drop: probably the most feasible of the list, however it only makes sense in combination with state-saving (for example via local storage) - once again diminishing the "light weight" aspect of the component
As for paging & toolbar, there are already dozens of grid components available which have these things as well as stuff like grouping, footers etc. If we add all of that then it's not a light weight component anymore.
@NessfertIndia multiple row selection sounds interesting, could you share the use case for this?
Multiple row selection scenarios is common if we deal with a list of table data where we want to select multiple items from the table and allow to perform further actions on that. One of the example I have to deal with is Show a list of contacts in a table Allow the user to select 1 or more contacts by pressing a checkbox [ Selected checkbox can be moved to unchecked state as well] Perform an operation against the selected contacts [ For me it was Remove selected Contacts / Mark Selected Contacts as Premium Members ] A possible example can be found here: https://mudblazor.com/components/table#multi-selection [ Search for content Multi-selection on the page if the URL not showing correctly] I used Mudblazor on my projects , but this multi-selection is not maintaining selections if we are doing paging sorting filtering etc and I am still in search for alternate controls
Hope the explanation is clear and let know if need more info
Why not implementing checkboxes for selecting each row with a header checkbox to select all items in the current page? This is very useful.