Simulate hierarchical multiselect

5 posts, 0 answers
  1. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 27 Aug 2013 Link to this post

    I would like to simulate hierarchical multiselect so values from one multiselect efects on values on other one.
    So when I click mouse on other multiselect it checks server with values from first multiselect.

    I think I know how to set values with param value on second multiselect data source.
    But I how to force to re read server when popup is opened?  Like initial autobind = false. But always.

    I'm using simple Json request and I cannot use odata  type.
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 28 Aug 2013 Link to this post

    Hello Marcin,

    In general, you need to build filter options from the parent's selected items. Check this jsFiddle demo, which shows how to build them.

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 28 Aug 2013 Link to this post

    Hello
    Thank you for answer, it gives me an idea which way to go. However I would like to get a bit different behaviour. When I change supplier, data of product should not be changed until popup.

    In fact (becuase I cannot use odata) I would like to have something like that:
    on popup/start typing it read data based on other combo/multiselect, then filters it locally based on entered text.

    I think it won't be possible, but would I'm wonder if such behaviour would be possible:
    1. Read data like with serverFiltering: false  and autoBind:false;
    2. Do not cache results after selecting/not selecting
    3. So every time it will read data from server - then I could use custom param in data read.

    Regards
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Aug 2013 Link to this post

    Hello again Marcin, 

     
    Well, you can enable server filtering, thus it will not be neccessary to know when the user just opens the popup or starts to typing. When filtration happens on the server, just send the value of the ComboBox. You can use either the data option or the parameterMap.

    Regards,
    Georgi Krustev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 29 Aug 2013 Link to this post

    Hello
    Thank you for your answer, I did the change differently, at looks working :)
    1. product datasource has data parameter which is the function which reads values from supplier multiselct
    2. On supplier change (instead of filter) I just call productDataSource.read(). Which reads properly and only once per parameter.
    3. I'm now using serverFiltering: false
    4. It is not exactly what I wanted to achieve, but number of server reads is not redundant so I can live with that.

    Thank you for your help.

    Marcin
Back to Top
Kendo UI is VS 2017 Ready