or
sender.transferItem(item, e.get_sourceListBox(), e.get_destinationListBox());
Basically, the aspx page has a source and destination listbox. The source listbox is pre-populated in the code behind with a list of approximately 10 items. The error occurs when a transfer is performed from the source to the destination listbox or from the destination to the source listbox.
The code for the JavaScript function that is called by the source listbox for the OnCLientTransferring event is as follows:
| function RadListBoxColumnSource_OnClientTransferring(sender, e) | |
| { | |
| // Cancel the transfer so that can validate which items can be transferred. | |
| e.set_cancel(true); | |
| // Manually transfer items that are not formula items. | |
| var items = e.get_items(); | |
| for (var i = 0; i < items.length; i++) | |
| { | |
| var item = items[i]; | |
| // If the tooltip information is available then the item is a formula. | |
| var toolTip = item.get_toolTip(); | |
| if ((toolTip == null) || (toolTip.length() == 0)) | |
| { | |
| sender.transferItem(item, e.get_sourceListBox(), e.get_destinationListBox()); | |
| } | |
| } | |
| return; | |
| } |
The code snippet for the listboxes in the aspx page is as follows:
| <table style="font-size: 0.7em; font-family: Verdana" width="500px"> | |
| <tr> | |
| <td> | |
| <asp:Panel ID="PanelSource" runat="server" GroupingText="Data Columns" Width="100%"> | |
| <telerik:RadListBox ID="RadListBoxColumnSource" runat="server" AllowReorder="false" AllowTransfer="true" EnableDragAndDrop="true" SelectionMode="Multiple" TransferToID="RadListBoxColumnTarget" Width="220px" Height="400px" OnClientTransferring="RadListBoxColumnSource_OnClientTransferring" > | |
| <ButtonSettings ShowTransferAll="true" /> | |
| </telerik:RadListBox> | |
| </asp:Panel> | |
| </td> | |
| <td> | |
| <asp:Panel ID="PanelTarget" runat="server" GroupingText="Selected Data Columns" Width="100%"> | |
| <telerik:RadListBox ID="RadListBoxColumnTarget" runat="server" AllowReorder="true" EnableDragAndDrop="true" SelectionMode="Multiple" Width="220px" Height="400px" > | |
| <ButtonSettings ShowReorder="true" /> | |
| </telerik:RadListBox> | |
| </asp:Panel> | |
| </td> | |
| </tr> | |
| </table> |
The browser version is Internet Explorer 8.0.6001.18702 and the version of the Telerik controls are 2009.2.826.
Any help in resolving this issue is appreciated.
Thanks,
Tony
| <abc:TreeView ID="tvEmner" runat="server" /><!-- User control containing a telerik:RadTreeView control --> |
| <asp:Panel ID="pnlEmner" runat="server"> |
| <tel:RadTreeView ID="tvEmner" EnableDragAndDrop="true" Width="300px" Height="250px" |
| OnNodeDrop="OnEmneDropped" OnNodeClick="OnEmneClicked" OnNodeExpand="OnEmneExpanded" |
| OnClientNodeClicking="onEmneNodeClicking" |
| OnClientContextMenuItemClicking="onEmneContextMenuItemClicking" OnClientContextMenuShowing="onEmneContextMenuShowing" |
| runat="server"> |
| <ContextMenus> |
| <tel:RadTreeViewContextMenu ID="cmRoot" runat="server"> |
| <Items> |
| <tel:RadMenuItem Value="Create" PostBack="false" Text="Opret emne"> |
| </tel:RadMenuItem> |
| </Items> |
| <CollapseAnimation Type="none" /> |
| </tel:RadTreeViewContextMenu> |
| </ContextMenus> |
| <DataBindings> |
| <tel:RadTreeNodeBinding Expanded="True" /> |
| </DataBindings> |
| </tel:RadTreeView> |
| </asp:Panel> |
| var node = Al.EmneTreeView.getSelectedNode(); // function that gets the selected node |
| node.collapse(); |
| node.get_treeView().trackChanges(); |
| node.get_nodes().clear(); |
| node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack); |
| node.get_treeView().commitChanges(); |
| node.expand(); |
| <tel:RadAjaxManagerProxy ID="PageAjaxManager" runat="server"> |
| <AjaxSettings> |
| <tel:AjaxSetting AjaxControlID="tbButtons"> |
| <UpdatedControls> |
| <tel:AjaxUpdatedControl ControlID="tbButtons" /> |
| <tel:AjaxUpdatedControl ControlID="tvEmner" LoadingPanelID="AjaxLoadingPanel" /> |
| </UpdatedControls> |
| </tel:AjaxSetting> |
| </AjaxSettings> |
| </tel:RadAjaxManagerProxy> |