Read-only tagged items in multiselect

8 posts, 1 answers
  1. Andriy
    Andriy avatar
    7 posts
    Member since:
    May 2012

    Posted 02 Dec 2014 Link to this post

    Hi there,

    I need to implement some specific behavior for multiselect widget ( see attached image).

    1. Need to disable some items within selected ones in a multiselect field.
    2. Hide 'close/delete/X' icon for disabled ones.
    It would be great for example to apply some template for each item to handle this.

    Maybe you can recommend any existing API for this.

    Best regards,

    Andriy Frankiv
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 03 Dec 2014 Link to this post

    Hello Andriy,

    Currently, widget does not support such functionality. You can, however, return the items that are "read-only" manually. Check this Dojo demo for one possible approach. You will need to hide the "X" button manually too - find the LI elements and hide the <span> element to all tags that should be "read-only".

    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. Andriy
    Andriy avatar
    7 posts
    Member since:
    May 2012

    Posted 03 Dec 2014 in reply to Georgi Krustev Link to this post

    Hello Georgi,

    Currently we use MVVM approach. Could you please provide some solution/workaround that will follow MVVM rules?

    Best regards,

    Andriy Frankiv
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 04 Dec 2014 Link to this post

    Hello Andriy,

    Sure, no problem. Check this Dojo demo that demonstrates how to detect some changes and update the model value if needed.

    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. Andriy
    Andriy avatar
    7 posts
    Member since:
    May 2012

    Posted 04 Dec 2014 in reply to Georgi Krustev Link to this post

    Hello Georgi,

    Thanks for your reply.

    Could you please update the last sample with logic for disabling some selected items and hiding 'X' icon for them?

    Best regards,

    Andriy Frankiv
  7. Andriy
    Andriy avatar
    7 posts
    Member since:
    May 2012

    Posted 04 Dec 2014 in reply to Georgi Krustev Link to this post

    Hello Georgi,

    Thanks for your reply.

    Could you please add logic to this example for disabling some selected items and hiding 'X' icon for them?

    Best regards,

    Andriy Frankiv
  8. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 08 Dec 2014 Link to this post

    Hello Andriy,

    Here is the updated demo. Notice how we use the dataBound and change events to accomplish the desired functionality.

    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  9. Andriy
    Andriy avatar
    7 posts
    Member since:
    May 2012

    Posted 08 Dec 2014 in reply to Georgi Krustev Link to this post

    Hello Georgi,

    Thanks a lot for your reply. It was rather helpful.

    Best regards,
    Andriy Frankiv
Back to Top
Kendo UI is VS 2017 Ready