MultiSelect and Grid - initialization using query string variables

6 posts, 1 answers
  1. James
    James avatar
    3 posts
    Member since:
    Apr 2018

    Posted 09 Apr Link to this post

    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

  2. Answer
    Neli
    Admin
    Neli avatar
    221 posts

    Posted 11 Apr Link to this post

    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.
  3. James
    James avatar
    3 posts
    Member since:
    Apr 2018

    Posted 11 Apr in reply to Neli Link to this post

    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.

  4. Neli
    Admin
    Neli avatar
    221 posts

    Posted 13 Apr Link to this post

    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.
  5. James
    James avatar
    3 posts
    Member since:
    Apr 2018

    Posted 13 Apr in reply to Neli Link to this post

    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.

  6. Neli
    Admin
    Neli avatar
    221 posts

    Posted 16 Apr Link to this post

    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.
Back to Top