This is a migrated thread and some comments may be shown as answers.

MultiSelect event on click item

5 Answers 463 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
chavigny
Top achievements
Rank 1
chavigny asked on 27 May 2014, 02:09 PM
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

5 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 28 May 2014, 11:26 AM
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.

 
0
chavigny
Top achievements
Rank 1
answered on 02 Jun 2014, 09:10 AM
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.
0
Accepted
Dimiter Madjarov
Telerik team
answered on 02 Jun 2014, 12:10 PM
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.

 
0
chavigny
Top achievements
Rank 1
answered on 02 Jun 2014, 12:14 PM
Hello Dimiter,

This is exactly what I want to do.

Regards,
Ludovic.
0
Dimiter Madjarov
Telerik team
answered on 02 Jun 2014, 12:18 PM
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.

 
Tags
MultiSelect
Asked by
chavigny
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
chavigny
Top achievements
Rank 1
Share this question
or