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

Add MultiSelection to Datagrid SelectColumn #5619

Closed
Mr-Pearce opened this issue Jul 12, 2024 · 14 comments · Fixed by #5848
Closed

Add MultiSelection to Datagrid SelectColumn #5619

Mr-Pearce opened this issue Jul 12, 2024 · 14 comments · Fixed by #5848
Assignees
Labels
Type: Feature ⚙ Request or idea for a new feature.
Milestone

Comments

@Mr-Pearce
Copy link

Is your feature request related to a problem? Please describe.
Currently you cannot select multiple entries in the DatagridGridSelectColumn

Describe the solution you'd like
A Solution would be to add a Multiple mode from like https://blazorise.com/docs/extensions/selectlist
so we could select multiple entries.

Additional context

Add any other context or screenshots about the feature request here.

@Mr-Pearce Mr-Pearce added the Type: Feature ⚙ Request or idea for a new feature. label Jul 12, 2024
@blenke
Copy link

blenke commented Jul 16, 2024

I proposed something like this earlier, would be a great addition.
See #5455
Also because the custom filter requires additional code if you want to save and read the state of the datagrid.

@stsrki
Copy link
Collaborator

stsrki commented Jul 16, 2024

We have multiple selection mode. Check the docs https://blazorise.com/docs/extensions/datagrid/selection/multiple

@blenke
Copy link

blenke commented Jul 16, 2024

I think that is different, that is for selecting multiple rows. The multi select we propose is for the select filter, now you can only select one value from the dropdown menu. What we looking for is that we can select 2 or more values so that a column gets filtered on that (its a bit like in Excel) .

@Mr-Pearce
Copy link
Author

Yes I meant the filter.
Currently you can only select one from the select.
But multiple like in my example link would be nice.
So we could filter for e.g. multiple states and so on

@stsrki
Copy link
Collaborator

stsrki commented Jul 16, 2024

@David-Moreira can you help?

@David-Moreira
Copy link
Contributor

David-Moreira commented Jul 16, 2024

I think it makes sense, the problem is that we currently do not support multiple values filtering. Our internals are just not yet made for it.

Similar request was made where user wanted a range of values to be able to define 2 filter values that would represent the start and end for a date between filter:
#5586

@blenke
Copy link

blenke commented Jul 16, 2024

Ok, that part wasn't clear to me. Hopefully you can put this on the wish list for a future version. I can use my custom implementation but it got more complicated with the datagrid state management.

@stsrki
Copy link
Collaborator

stsrki commented Jul 16, 2024

I think it makes sense, the problem is that we currently do not support multiple values filtering. Our internals are just not yet made for it.

Similar request was made where user wanted a range of values to be able to define 2 filter values that would represent the start and end for a date between filter: #5586

How hard would it be to do it for 1.6? We still have some time left.

@David-Moreira
Copy link
Contributor

I have to investigate. I'll let you know.

@David-Moreira
Copy link
Contributor

I think it makes sense, the problem is that we currently do not support multiple values filtering. Our internals are just not yet made for it.
Similar request was made where user wanted a range of values to be able to define 2 filter values that would represent the start and end for a date between filter: #5586

How hard would it be to do it for 1.6? We still have some time left.

hmm I think we need to introduce a list of search values, that if exist will be taken into consideration when searching.

Since we don't really want to be touching on the existing API I'd probably add

    /// <summary>
    /// Gets or sets the filter values.
    /// </summary>
    public List<object> SearchValues { get; set; }

    public void TriggerFilterChange( params object values )
    {
    SearchValues ....
    SearchValuesChanged...

    }

image
It's a bit duplicated, but retro compatibility is a must so... Might not be too hard, basically just propagate it everywhere SearchValue currently exists, and change the Filtering to handle multiple values?

@stsrki
Copy link
Collaborator

stsrki commented Jul 20, 2024

Seems good. Create the PR, and I'll see how it behaves.

@stsrki
Copy link
Collaborator

stsrki commented Jul 25, 2024

Can existing SearchValue be used to store a List<> object type? So that we don't need to introduce new SearchValues just for this usecase.

@David-Moreira
Copy link
Contributor

Can existing SearchValue be used to store a List<> object type? So that we don't need to introduce new SearchValues just for this usecase.

I think that might break too much stuff for users. I would do that in a 2.0.

@stsrki stsrki added this to the 1.7 milestone Jul 31, 2024
@stsrki stsrki moved this from No Status to Considered in Development Jul 31, 2024
@github-project-automation github-project-automation bot moved this to No Status in Development Jul 31, 2024
@stsrki
Copy link
Collaborator

stsrki commented Nov 13, 2024

@David-Moreira, what do you think? How much would it take you for this?

PS. Considering that we already have Between logic so the Multiple would be fairly similar.

@stsrki stsrki modified the milestones: 1.7, 2.0 Nov 15, 2024
@github-project-automation github-project-automation bot moved this from Considered to Done in Development Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants