Blazorise icon indicating copy to clipboard operation
Blazorise copied to clipboard

How is DataGridSelectColumn different from DataGridColumn?

Open GilShalit opened this issue 4 years ago • 5 comments

This is somewhere between an issue and a feature request:

I am using a DataGridSelectColumn in the DataGrid to implement a drop down selection box. As per samples I could find i implemented an EditTemplate which builds a <Select> element containing <SelectItem> elements. Works fine.

But then I thought - if this is a DataGridSelectColumn, why do i need to build the <Select> element? So I changed the column definition to a regular DataGridColumn and everything worked as before... Am I missing something?

So my suggestion is - either eliminate the DataGridSelectColumn or add a built in <Select> implementation.

Thanks!

GilShalit avatar May 13 '21 08:05 GilShalit

I wanted to have column types separated based on their edit capabilities. The tricky part with select columns was how to fill them with data. I must admit, I completely forgot about this and I will need to consider implementing this feature soon. Something along with the SelectList component where it would be dynamically filled with items.

True, you can use DataGridColumn with EditTemplate and build everything yourself, but I prefer not mixing it and seeing DataGridSelectColumn you know what it stands for when you read the code.

stsrki avatar May 13 '21 09:05 stsrki

Starting work on this. SelectList seems like a very good option here, allowing easily for something like this: <DataGridSelectColumn TItem="Test" Data="@selectItems" TextField="(x=> x.Description)" ValueField="(x=> x.Id)" /> And then make the SelectedValue be handled properly internally.

Thing is SelectList is part of our Blazorise.Components package, so we'll pretty much have to recreate a simpler version based on Select. Nothing against this right, @stsrki ?

David-Moreira avatar Jul 09 '22 15:07 David-Moreira

Yeah, that sounds good to me.

stsrki avatar Jul 09 '22 20:07 stsrki

@David-Moreira, any progress or difficulties on this?

stsrki avatar Aug 16 '22 13:08 stsrki

Hello, like we've talked we paused development on this to focus on the bigger PRs yet to be closed, FilePicker / Autocomplete

Status: FilePicker: I'm still doing the 2GBs+ tests on WASM. (PS: Nice layout changes on FilePicker :))

Autocomplete: Should be about ready, still want to run some more tests and see if I can write more unit tests.

I doubt we can make this into the current release, we can try on a best effort basis, based if we close the currently opened PRs soon.

David-Moreira avatar Aug 16 '22 22:08 David-Moreira