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

'All To Left': prevent transfer of some list items

1 Answer 44 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
G.
Top achievements
Rank 1
G. asked on 27 Mar 2012, 02:56 PM
All,

I have 2 rad list boxes working in tandem (boxA, boxB)... and I have some list items that are mandatory selections that must always remain in boxB and never be removed.

On the server side I populate boxA and then automatically add mandatory list items in boxB.

Next, I prevent users from transfering a mandatory item from boxB back to boxA via client side code.
I have devised a way to enforce this functionality (using OnClientTransferring ) for a single transfer from boxB to boxA, but I am not sure how to approach enforcing this for a "Transfer All" / "All to Left" transfer.  Please see attached.

If someone could provide some direction here it would be appreciated.

Thanks,
Jai


1 Answer, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 30 Mar 2012, 10:41 AM
Hi Jai,

You are on the right way using OnClientTransferring event. Please note that the event argument gives you an access to all transferring items. Using the method get_items you can get them and apply your custom logic to each item.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListBox
Asked by
G.
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Share this question
or