Completed
Last Updated: 03 Apr 2020 16:17 by ADMIN
René
Created on: 19 Feb 2020 10:56
Category: Grid
Type: Bug Report
3
SelectAll in MultiSelectionGrid selects more items then visible in filtered grid.



<TelerikGrid Data="@GridData"
             FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
             SelectionMode="@GridSelectionMode.Multiple"
             @bind-SelectedItems="SelectedItems">
    <GridColumns>
        <GridCheckboxColumn Width="35px"/>
         <GridColumn Field="@(nameof(Data.Name))" />
     </GridColumns>
 </TelerikGrid>

@code{

    public class Data
    {
        public string Name { get; set; }
    }

    public List<Data> GridData { get; set; }
    public IEnumerable<Data> SelectedItems { get; set; }
    protected override void OnInitialized()
    {
        GridData = new List<Data>();
        SelectedItems = new List<Data>();
        GridData.Add(new Data{Name="abc"});
        GridData.Add(new Data{Name="abe"});
        GridData.Add(new Data{Name="xyz"});
    }
}

1. Filter the above grid by "abc" (the filtered grid will display "abc" correctly as the only entry)

2. Click into the "SelectAll" Checkbox (SelectedItems will wrongly contain "abc" AND "abe" !!!)

3. Click on "ClearFilter" Button --> the grid will display both "abc" and "abe" as selected !!!

 

It might be an indexing problem because the "SelectAll" Logic always seems to ignore the last character of the search string while the filtering of the display takes all characters into account.

This bug has cost be many hours and stomach pain!  Please let me know, if this will be fixed soon.  If not I will have to implement my own filtering (which makes me wonder why I'm using Telerik UI).

 

17 comments
ADMIN
Marin Bratanov
Posted on: 03 Apr 2020 16:17

Hi Matt, 

Thank you for letting me know.

By the way, we already have 2.10.0 that has a few nice things like frozen columns, a ton of improvements around the selection, and new checkbox, listview and pager components.

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Matt
Posted on: 03 Apr 2020 15:59
Finally got the latest version. Not having the issue anymore in 2.9.
ADMIN
Marin Bratanov
Posted on: 20 Mar 2020 17:19

We haven't had updates and new reports for this for two releases now (2.8.0 and 2.9.0), so I am marking it as resolved in 2.8.0. If it resurfaces, let's discuss the particulars.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
ADMIN
Marin Bratanov
Posted on: 10 Mar 2020 10:28

Hi Matt,

Another quick way to confirm this would be to start a trial for blazor and test the latest things (just make sure to alter the static assets path to include ".Trial" at the end of the folder name, if you are using the static assets).

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Matt
Posted on: 10 Mar 2020 09:50
Still waiting to get 2.8. Have to put in requests to have the new versions made available to the company. Will report back when I get the update.
ADMIN
Marin Bratanov
Posted on: 03 Mar 2020 09:29

Hello,

I think that this issue comes from the following one where the old grid data is "cached" by selection: https://feedback.telerik.com/blazor/1444399-clearing-grid-data-does-not-clear-selecteditems

@Matt - does the original issue with the built-in filtering work fine for you after 2.8.0?

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
René
Posted on: 03 Mar 2020 07:08

Hello Marin,

we have encountered another situation where "SelectAll" selects too many items.

We have implemented a custom multi-search box to search for a search string in multiple columns.  We have two lists "AllData" and "GridData". In OnAfterRendered we set GridData=AllData.  Whenever the search string is changed we set GridData = AllData.Where(<filterLogic>).  The filtering works fine but if the "SelectAll" Checkbox is clicked after filtering, there are many more items selected than the ones visible.  I don't know if it matters but the grid is pageable with 50 rows per page.

ADMIN
Marin Bratanov
Posted on: 02 Mar 2020 10:28

Thank you for stepping in so quickly, René.

Matt, could you try upgrading to 2.8.0 so we can see if this is gone?

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
René
Posted on: 02 Mar 2020 10:25

So far we have not encountered the problem anymore since upgrading to 2.8.0.

Regards,

René

ADMIN
Marin Bratanov
Posted on: 02 Mar 2020 10:16

Hi Matt,

In a private thread with René it seemed that the 2.8.0 release should fix this one, but I haven't had concrete feedback yet. What version are you running on?

@René, could you confirm if upgrading to 2.8.0 fixes this?

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
Matt
Posted on: 01 Mar 2020 00:21
I'm also hitting this issue in a production application. Leveraging this for multiple bulk operations delete, cancel, etc. This is a big impact. Any estimated timeline for a fix? Not sure we can wait for one on such a large impacting bug :(
ADMIN
Marin Bratanov
Posted on: 20 Feb 2020 10:03

Hello René,

I have created a private thread with you where we can see if 2.8.0 will fix this.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
René
Posted on: 20 Feb 2020 08:54

Hello Marin,

that's bad news.  We are using this in production and problems due to wrong selection occur on a regular basis.

I cannot rely on "may" and "if" and such to get rid of those problems.

I guess I have to implement my own filtering now since my boss is not amused!

ADMIN
Marin Bratanov
Posted on: 20 Feb 2020 08:40

Hi René,

We may have to push 2.8.0 for next week, as a new preview of WASM is expected to drop. We were expecting it in mid-March initially, but if it drops on Monday it will not make sense to release every 3 days.

Thank you for your patience.

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor
René
Posted on: 19 Feb 2020 16:28

Hello Marin,

just to let you know: I just tested with 2.7.1 but the problem is the same.  So I'll keep on waiting for 2.8.0.

René
Posted on: 19 Feb 2020 15:25

Hello Marin,

thanks for the quick response.  I'll wait for the 2.8.0 release and let you know if it fixes the problem for us.

ADMIN
Marin Bratanov
Posted on: 19 Feb 2020 15:18

Hello René,

Thank you for reaching out.

We are aware of some issues with the selection feature and we are working through them.

The issue you report has been alleviated a little in 2.7.1 and I just tested with the latest code that will become 2.8.0 (hopefully, by the end of the week), and this seemed to work fine for me.

Could you try the 2.8.0 when it comes out and let me know if it is OK for you?

Here's the code I modified slightly to show a visual indicator of the selection:

<TelerikGrid Data="@GridData"
             FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
             SelectionMode="@GridSelectionMode.Multiple"
             @bind-SelectedItems="SelectedItems">
    <GridColumns>
        <GridCheckboxColumn />
        <GridColumn Field="@(nameof(Data.Name))" />
    </GridColumns>
</TelerikGrid>

@if(SelectedItems != null)
{
    foreach (var item in SelectedItems)
    {
        <div>@item.Name</div>
    }
}

@code{

    public class Data
    {
        public string Name { get; set; }
    }

    public List<Data> GridData { get; set; }
    public IEnumerable<Data> SelectedItems { get; set; }
    protected override void OnInitialized()
    {
        GridData = new List<Data>();
        SelectedItems = new List<Data>();
        GridData.Add(new Data { Name = "abc" });
        GridData.Add(new Data { Name = "abe" });
        GridData.Add(new Data { Name = "xyz" });
    }
}

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor