I need to check item value when transfering if its already exist in destination listbox.
I came up with this code, but it always failed to get destination items length.
Pls help,
Thanks..
I came up with this code, but it always failed to get destination items length.
function
validateItemTransfer(sender, args) {
debugger;
var
items = args.get_items();
for
(
var
i = 0; i < items.length; i++) {
var
item = items[i];
var
destinationItems = args.get_destinationListBox().get_items();
for
(
var
j = 0; j < destinationItems.length; j++) {
var
destinationItem = destinationItems[j];
if
(item.get_value() == destinationItem.get_value()) {
args.set_cancel(
true
);
}
}
}
}
Pls help,
Thanks..