MultiSelect event on click item

6 posts, 2 answers
  1. chavigny
    chavigny avatar
    5 posts
    Member since:
    Dec 2013

    Posted 27 May 2014 Link to this post

    Hello,

    I want to make specifics operations if I click on an element of the MultiSelect and others operations if I click on empty space of the MultiSelect.

    How can I do this?

    Best regards

    Chavigny
  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2155 posts

    Posted 28 May 2014 Link to this post

    Hello Chavigny,


    The build in events of the MultiSelect does not cover this behavior, so it should be manually implemented. You could attach a click handler to the element and check the exact target of the click. Here is a sample implementation, that demonstrates this. You could use it as a base and modify it according to the current requirements.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. chavigny
    chavigny avatar
    5 posts
    Member since:
    Dec 2013

    Posted 02 Jun 2014 in reply to Dimiter Madjarov Link to this post

    Hello Dimiter,

    Thank you for the reply. 
    I have one last question. How can I retrieve the object identifier or loaded when I click on item?

    Regards,
    Ludovic.
  5. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2155 posts

    Posted 02 Jun 2014 Link to this post

    Hi Ludovic,


    You could achieve this by retrieving the index of the clicked item and finding it in the dataItems collection which represents the selected items. For your convenience I modified the sample code a bit, so that it suits the current case.

    I wish you a great day!

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. chavigny
    chavigny avatar
    5 posts
    Member since:
    Dec 2013

    Posted 02 Jun 2014 Link to this post

    Hello Dimiter,

    This is exactly what I want to do.

    Regards,
    Ludovic.
  7. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2155 posts

    Posted 02 Jun 2014 Link to this post

    Hello Ludovic,


    Thanks for the nice words.
    I am glad the example suits the current case.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready