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

Adding items from different Listboxes, and then counting them

1 Answer 31 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Laurence
Top achievements
Rank 1
Laurence asked on 21 Dec 2014, 10:04 PM
I currently have 3 listboxes - Each one contains a "CustomAttr" attribute.

Listbox1.items["CustomAttr"] = 1
Listbox2.items["CustomAttr"] = 2
Listbox3.items["CustomAttr"] = 3

Destination Listbox = DestinationListBox

So when I drag an item from Listbox 1 to DestinationListBox, the item in DestinationListBox will still maintain ["CustomAttr"] = 1 (I believe)

In the OnClientTransferring client event, is it possible to get a count of items in DestinationListBox by attribute? 

The reason I ask is I want to be able to add only 5 items of ["CustomAttr"]  = 1, and ensure that if that is the case from OnClientTransferring, I can cancel the event using args.set_cancel(true);


If anyone has a better way of carrying out this type of function, I would really appreciate the assistance..

Many thanks,
Laurence

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 24 Dec 2014, 08:25 AM
Hello,

I've created a sample page demonstrating the described functionality. Feel free to modify it to suit your requirements as needed.

Regards,
Bozhidar
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
ListBox
Asked by
Laurence
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or