Cascading DropDownList with n:n relation

3 posts, 1 answers
  1. Tayger
    Tayger avatar
    118 posts
    Member since:
    Jan 2015

    Posted 17 Oct 2015 Link to this post

    Hello there

    I'm working with 2 DropDownLists, parent and child. It works fine so far with cascading . Then I realized the relation from parent to child is always 1:n. Is there a (easy) way to make it n:n? An example based on data source:


          dataSource: [
            { actionText: "​​Drive", actionId: 1 },
            { actionText: "​Open", actionId: 2 }


          dataSource: [
            { objectText: "Car", objectId: 1, actionId: 1 },
            { objectText: "Window", objectId: 2, actionId: 2 }

    This gives the following (cascading) relations: 

    Drive   -> Car
    Open   -> Window

    But a car can be opened (its doors)  as well, so the following cascading relations are wanted:
    Drive -> Car
    Open -> Car
               -> Window

    That means I need to define two relations from child "Car" to parent (to "Drive" AND "Open"). So when "Open" is chosen from parent DropdownList the child DropdownList should have listed "Window" AND "Car" do be chosen. 

    Is there a (easy) way to define this? As a workaround I see a reconfiguration of the child dataSource after selecting an item from the parent DropdownList.




  2. Answer
    Georgi Krustev
    Georgi Krustev avatar
    3724 posts

    Posted 21 Oct 2015 Link to this post

    Hello Tayger,

    Indeed, the built-in cascading functionality expects the relation between parent and child to be 1:n. The only way to accomplish cascading n:m is to implement the filtering behavior manually. That being said, you will need a custom solution instead of the cascading feature.

    Note that custom solutions fall out of the scope of the standard support service.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Tayger
    Tayger avatar
    118 posts
    Member since:
    Jan 2015

    Posted 26 Oct 2015 in reply to Georgi Krustev Link to this post

    Thank you for your confirmation. So I will change the datasource on cascading dropdownlist.
Back to Top