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

RadAjaxPanel RadListBox in Content Page

3 Answers 73 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
CWS
Top achievements
Rank 1
CWS asked on 15 Jun 2010, 12:15 AM
I'm looking to Ajaxify the RadListBox control with the RadAjaxPanel to accomplish the following:
1.  Template both lists utilizing the ItemTemplate tag.
2.  Transfer items from the first list to the second list.
3.  Reorder items in the second list.
4.  Perform code behind databinding... no in-line databinding with the DataBinder.Eval()

After studying the demo examples for drag and drop and templated items, I was able to get everything to work in a non-master/content web page.  But once the markup was placed into a content tag, it no longer continued to work once any item was transfered or re-ordered.  To eliminate "user" error, I copied the demo example for templated items into a master/content scenario and found it failed to work in exactly the same way. http://www.telerik.com/help/aspnet-ajax/listbox-templates-overview.html

I simplified the issue to the following code example.  It no longer has any ItemTemplate or code behind. If this code is placed within a form tag of a new web page without a master page, it works as excepted.  If it is placed in a content section in a web page that does utilize a master page, it does not work.  As soon as an item is transfered, no other action can be performed on either list.

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="800px" Width="800px">
        <telerik:RadListBox ID="RadListBox1" runat="server" TransferToID="RadListBox2"
            Height="600px" Width="400px"
            AllowTransfer="true" AutoPostBackOnTransfer="true"  SelectionMode="Multiple" >
        <Items>
            <telerik:RadListBoxItem Value="1" Text="image1.png" Caption="Stock 1"/>
            <telerik:RadListBoxItem Value="2" Text="image2.png" Caption="Stock 2"/>
            <telerik:RadListBoxItem Value="3" Text="image3.png" Caption="Stock 3"/>
        </Items>
        </telerik:RadListBox>

        <telerik:RadListBox ID="RadListBox2" runat="server" Height="600px" Width="400px" >
        </telerik:RadListBox>
    </telerik:RadAjaxPanel>

Environment Info:
XP sp3
Visual Studio 2010, solution is .net 4.0
IE 8.0
Telerik build: RadControls_for_ASP.NET_AJAX_2010_1_519_dev.msi

Thanks


3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 17 Jun 2010, 02:49 PM
Hello James,

Thank you for contacting us and reporting this issue.

We need some more time to research it and try to fix it. We're sorry for the caused inconvenience.

Greetings,
Yana
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
CWS
Top achievements
Rank 1
answered on 17 Jun 2010, 06:42 PM
Actually, by chance I discovered the solution google'n the other day, which brought me to another thread on your forum.


The solution was simply to set the page attribute ClientIDMode="AutoID".

It might be helpful to make this requirement more pronounced in the documentation since most projects these days will be .net 3.5 or higher and will utilize master/content pages.

Thank you.  And nice job with the RadListBox control!  It's working quite nicely in a RadAjaxPanel in my project.
0
Yana
Telerik team
answered on 18 Jun 2010, 11:15 AM
Hi James,

You are right that the problem is caused by the wrong ids and setting ClientIDMode to "AutoID" fixes the issue. We'll consider adding this to the documentation. Thank you for your feedback.

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