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

Reorder Jscript errors

2 Answers 67 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Pedro De Sousa
Top achievements
Rank 1
Pedro De Sousa asked on 17 May 2010, 10:25 AM
Hi,

I'm using two RadListBox to transfer items to a "preferred" group and reorder items

          <telerik:RadListBox runat="server" ID="favList" Width="250px" Height="146px" AllowTransferOnDoubleClick="true"
                              AllowReorder="true" AllowTransfer="true" TransferToID="notFavList"
                              DataSourceID="favSrc" DataKeyField="Id" DataValueField="Id" DataTextField="Title"
                              OnClientTransferring="onClientTransferring">
            <ItemTemplate><asp:Literal runat="server" Text='<%# Eval("Title") %>' Mode="Encode" /></ItemTemplate>                              
          </telerik:RadListBox>
     ...
          <telerik:RadListBox runat="server" ID="notFavList" Width="250px"
                              DataSourceID="notFavSrc" DataKeyField="Id" DataValueField="Id" DataTextField="Title">
            <ItemTemplate><asp:Literal runat="server" Text='<%# Eval("Title") %>' Mode="Encode" /></ItemTemplate>
          </telerik:RadListBox>

I can reorder items of my "favList", but when I transfer an item from  "notFavList" to "favList" and I try to reorder to move up the item  I get the following error when the item arrives on top position:
Microsoft JScript runtime error: Object required
I find the issue at this line (p.documentElement is null):
var d=function(p){return p.nodeType===9&&p.documentElement.nodeName!=="HTML"||!!p.ownerDocument&&d(p.ownerDocument);

Do you know any solution to fix or prevent this issue ?
Thanks in advance

Pedro


2 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 17 May 2010, 05:05 PM
Hello Pedro De Sousa,

If templates are used, one needs to use server-side transfer instead of client-side transfer. This is to say that you need to have AutoPostackOnTransfer = true on your source RadListBox.


Best wishes,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Pedro De Sousa
Top achievements
Rank 1
answered on 18 May 2010, 10:15 AM
Hi,

In my case I dont need an ItemTemplate because I display only the title of the object so I removed it and it works fine with the DataValue/TextField only.

Thx for help.

(Note: With the itemTemplate and the postback on transferring attribute set to true, the component doesnt crash but the transferred element doesnt appear in the "favList", so the issue persists for people trying an identical code than my previous one.)
Tags
ListBox
Asked by
Pedro De Sousa
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Pedro De Sousa
Top achievements
Rank 1
Share this question
or