This is a migrated thread and some comments may be shown as answers.

select ALL not working for server filtering true

5 Answers 180 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Mohanapriya
Top achievements
Rank 1
Mohanapriya asked on 08 Mar 2018, 04:21 PM

This is very urgent production issue.

I have the below function which is attached to my multiselect 'select' event.

function SelectAllMultiSelect(e) {
 var dataItem = this.dataSource.view()[e.item.index()];
 var values = this.value();
 if (dataItem.Value === "ALL") {
        this.value(" ");
   } else if (values.indexOf("ALL") !== -1) {
      values = $.grep(values, function (value) {
 return value !== "ALL";
      });
 this.value(values);
    }
}

 

This works fine for controls which don't have server filtering set to true. For the control set to server filtering true, this is not working. It was working in older version 2015 and now, stopped working in 2017. Even if I select a new item, 'ALL' doesn't go away. Please let me know the resolution.

 

Thanks.

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 09 Mar 2018, 12:44 PM
Hello Mohanapriya,

I was able to reproduce abnormal behavior with Telerik UI for ASP.NET MVC 2017.3.1026. The issue is reproducible with Kendo UI 2017.3.1026 as well.

The good news is that the problem is fixed and not reproducible with our consecutive releases R1 2018 and R1 2018 SP1.
The following Dojo snippet shows the scenario with R1 2018 SP1 and it is working as expected on my side. Note that as there is no item with value ALL in the demo data, I substituted it in the handler logic with the item with value 1 - "Chai". So selecting "Chai" acts as selecting ALL. The following screencast shows the same logic working as expected on the MultiSelect Events MVC demo with R1 2018 SP1. Upgrading to our latest version will resolve the issue.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mohanapriya
Top achievements
Rank 1
answered on 09 Mar 2018, 01:10 PM

Hi,

 

We only recently upgraded from 2015 to 2017 version in production and we had some other UI formatting issues we had to fix. It is a big process within the organization to upgrade versions and it is a very time consuming process. Is there a workaround I could apply for this? That would be greatly appreciated.

 

Thanks.

Priya.

0
Dimitar
Telerik team
answered on 13 Mar 2018, 11:04 AM
Hello Priya,

The issue was fixed by the following commit in kendo.multiselect.js. A workaround for the issue is to override the value method of the MultiSelect as shown in the following Dojo snippet. I hope it will resolve the issue faced on your side as well.

Best regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Raff
Top achievements
Rank 1
Iron
answered on 15 Dec 2020, 09:01 AM

Hello,

This post is a little old, but I am trying to get exactly the same functionality to work in the current version, running the dojo sample there are some bugs which hopefully can be resolved.

In the sample shown if you use the filtering when the user starts typing then selecting "Chai" doesn't work, nor does selecting another option remove chai if you filter.

To reproduce:
1. Type ch into the multiselect then select Chai - Expecting Chai to be the only one selected but it wasn't

2. Type ch and select Chocolate - Expecting Chai to be removed from the select but it wasn't

 

I also need the filtering to work with minimum 2 characters so that the entire list is not loaded each time as we have hundreds of items.

 

Regards

Raff

0
Dimitar
Telerik team
answered on 17 Dec 2020, 08:58 AM

Hello Raff,

We have a How To article showing this scenario - Select All Values with Single Selection. Testing the filtering scenario with its examples, the described issue is not reproducible. I would recommend using the implementation from the article.

And to limit the number of characters initiating filtering, the minLength and enforceMinLength properties should be used.

As a side note, we have a Select or Deselect All Items article showing how to achieve this through external buttons as well.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
MultiSelect
Asked by
Mohanapriya
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Mohanapriya
Top achievements
Rank 1
Raff
Top achievements
Rank 1
Iron
Share this question
or