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

CheckedDropDownList with CheckAllItem enabled.....how do it

3 Answers 97 Views
CheckedDropDownList
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Mark asked on 25 Oct 2017, 03:42 PM

I have a CheckedDropDownList with the CheckAllItem enabled.  When I check or uncheck that item, I don't want the ItemCheckedChanged event to fire for all the other items in the list.  I want to handle the "All Checked" my self. Waiting for the control to spin through my list, which I could have 100's of items, takes a while, while I have other code running to process based on the items being checked or not.

 

TIA

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Oct 2017, 02:02 PM
Hello, TIA,    

Thank you for writing back. 

The ItemCheckedChanged event is fired when you toggle the state for an item. When you toggle the CheckAll item, all items will be toggled as well. It is normal and expected behavior that the ItemCheckedChanged is fired for each item. If you need to skip this multiple event firing I can suggest you add your own item to check all items programmatically by iterating all items and toggling their state. The ItemCheckedChanged will be fired for your custom item. In the event handler, you can iterate all items and manipulate the checked state. But it would be necessary to unsubscribe from the event and subscribe when all items are affected. Thus, you will skip firing the ItemCheckedChanged for each item separately.

I hope this information helps. If you have any additional questions, please let me know. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
answered on 26 Oct 2017, 02:06 PM

Yea, I figured this would be the case.  I will deal with the performance issues I am having if the users click "Check All".  

 

Is there a way that we can suggest that the "Check All" is not an actually item in the list, but an item separate from the list or at least for the CheckAllItem to have it's own event that we can subscribe to also.  

 

Thanks

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Oct 2017, 11:39 AM
Hello, Mark,    

Thank you for writing back. 

Your feedback is greatly appreciated. If other customers have similar requests we will consider changing the current behavior with the CheckAll functionality. Currently, you can subscribe to the ItemCheckedChanged event and check which is the affected item and thus determine if it is the CheckAll item or not.

I hope this information helps. If you have any additional questions, please let me know. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
CheckedDropDownList
Asked by
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Share this question
or