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

MultiSelect and Grid - initialization using query string variables

5 Answers 270 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 09 Apr 2018, 08:28 PM

Hello:

We are currently evaluating Kendo UI. Our application displays data to end users in two views - a tile view and a tabular view. Users have the ability to slice and dice data using filters in the tile view. We have a use case where users switch from grid view to tabular view and expect that the filters set in the tile view are persisted to tabular view.

We envision tabular view to consist of KendoGrid with multi-select controls as the column headers where users can filter the data. When initializing the grid, we would like to parse the query string variables and convert them to filter object and apply them to multi-select controls and the grid. My question: is it possible to initialize multi-select control and set its value at the time of initialization programmatically? 

Thanks,

James

5 Answers, 1 is accepted

Sort by
0
Accepted
Neli
Telerik team
answered on 11 Apr 2018, 02:04 PM
Hi James,

You can set the value in the MultiSelect widget, by using the value configuration option. If you need to change the widget`s value after initialization, you can use the value() method
In the linked Dojo example, the value is initially set. On button click, the value of the MutliSelect will be changed. 

Regards,
Neli
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
James
Top achievements
Rank 1
answered on 11 Apr 2018, 02:55 PM

Thanks, Neli.

I have a couple of follow-up questions.

1. If I have to change the widget's value after initialization, will "select" event get fired? Is there a way to disable the select event?

2. Are there any other controls in Kendo UI that are not UI heavy as multiselect. For example, we are using the attached user extension from 2014.

0
Neli
Telerik team
answered on 13 Apr 2018, 09:21 AM
Hello James,

1. When the value of the widget is changed programmatically the select event will not be triggered. 
2. If you need a lighter widget than MultiSelect, I would suggest you to take a look of the Autocomplete Demos and documentation. As you will see in the widget`s API, autocomplete also provides value method. As in the MultiSelect, the select event is not triggered if the value is changed programmatically. 

In the linked Dojo example there are both widgets - MultiSelect and Autocomplete. For both widgets there are buttons for changing the value. As you will see, the select event is not triggered. However, if you need to prevent the default behavior of the select event, you could do it as follows:
select: function(e){
e.preventDefault();
}

I hope this helps.


Regards,
Neli
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
James
Top achievements
Rank 1
answered on 13 Apr 2018, 04:54 PM

Thanks, Neli.

I am planning to use Kendo UI controls in SharePoint 2013 environment where we are constrained to use jQuery 1.11.0. I noticed that your demo used jQuery 1.12.4 

If I use jQuery 1.11.0, am I going to lose any functionality/features? I wonder if there is a way to use both versions side by side.

0
Neli
Telerik team
answered on 16 Apr 2018, 03:03 PM
Hello James,

On the following linк from the documentation you will find a list with the supported jQuery versions. I would recommend you to use one of the supported versions. Regarding using two versions of jQuery, please note that single jQuery script have to be included. If jQuery script is included multiple times, this might lead to errors. Here you can read more about that.  

Regards,
Neli
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.
Tags
MultiSelect
Asked by
James
Top achievements
Rank 1
Answers by
Neli
Telerik team
James
Top achievements
Rank 1
Share this question
or