Hi,
with version over 3.18.9 multiselect on the component DropDownDataGrid doesn't work, if I downgrade to 3.18.9 with same code, all work greatly.
Could you fix it?
Thank you
Any additional info how to reproduce it? Works normally on our demo:
https://blazor.radzen.com/dropdown-datagrid
When I select the second row, it delete the first, in the DropDown, while with 3.18.9 it works correctly like in the picture, see Articoli.
The information provided is not enough to reproduce the problem.
this is the code that I use. Last friday was working, after I've updated first to 3.18.10 and doesn't work, so I've noticed that there was another update and I installed it, but the problem was the same. With the downgrade all it ok:
@if (articoli != null)
{ <div class="col-md-6 ">
<h4 class="mb-4" style="float:left;">Articoli</h4>
<RadzenDropDownDataGrid @ref="grid1" AllowRowSelectOnRowClick="false" AllowFiltering="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive" AllowClear="true" @bind-Value=@multiArticoli
Multiple="true" Placeholder="Select..." Data=@articoli TextProperty="Articolo" ValueProperty="CodArt"
Change=@(args => OnChangeArt(args, "DropDownDataGrid with multiple selection")) Class="w-100">
<Columns>
<RadzenDropDownDataGridColumn Width="40px" Sortable="false">
<HeaderTemplate>
<RadzenCheckBox TriState="false" TValue="bool" Value="@(articoli.Any(c => multiArticoli != null && multiArticoli.Contains(c.CodArt)))"
Change="@(args => multiArticoli = args ? grid1.View.Cast<Articoli>().Select(c => c.CodArt) : multiArticoli = Enumerable.Empty<string>())" />
</HeaderTemplate>
<Template Context="data">
<RadzenCheckBox TriState="false" Value="@(multiArticoli != null && multiArticoli.Contains(((Articoli) data).CodArt))"
TValue="bool" Change=@(args => { grid1.SelectItem(data); }) />
</Template>
</RadzenDropDownDataGridColumn>
<RadzenDropDownDataGridColumn Property="CodArt" Title="Cod. Art" Width="100px" />
<RadzenDropDownDataGridColumn Property="Articolo" Title="Articolo" Width="200px" />
</Columns>
</RadzenDropDownDataGrid>
</div>
}
</div>
void OnChangeArt(object value, string name)
{
if (value != null)
{
var str = value is IEnumerable<object> ? string.Join(", ", (IEnumerable<object>)value).ToString().Trim() : value.ToString().Trim();
string[] codart = str.ToString().Split(",");
incNew.articoli = new List<Articoli>();
for (int i = 0; i < codart.Length; i++)
{
string p =articoli.Where(x=> x.CodArt.Trim()==codart[i].Trim()).Select(x=> x.Articolo).First();
incNew.articoli.Add(new Articoli { CodArt = codart[i].Trim(), Articolo = articoli.Where(x=> x.CodArt.Trim()==codart[i].Trim()).Select(x=> x.Articolo).First()});
}
}
else
{
incNew.articoli = null;
articoli = null;
}
}
'''
I’m afraid that I cannot help further, just by looking at your not even formatted code. If you have Radzen subscription you can send us an example application that we can run and debug the problem. As alternative you can attach our source project to your application to debug latest comits.
Check our FAQ for instructions how to format your code.
Hi, if you go to the component in question, in its demo page, you can see that the error I am reporting occurs. If you select two or more items in the listbox, only the last selection is shown, the other selections made by clicking on the checkbox are lost. Hope this time you can check and fix the problem. Thank you
Multiple selection seems to work as expected on our online demo. Here is a short gif that shows my experience.
Yestarday , on demo page, when I selected two o more item it shown in the listbox only the last selection, like in my code with version above 318.9. Now I've seen on demo and it works. It make me crazy ...
Warning, the error occurs when uncheck the option: "Row select on row click" , can you see it?
We were able to reproduce the problem - fix will be provided with our next update later this week.