ListBox inside a ListBox Javascript error

2 posts, 0 answers
  1. Ben Thies
    Ben Thies avatar
    5 posts
    Member since:
    Aug 2009

    Posted 24 Mar 2010 Link to this post

    Hi guys,

    I am using a RadListBox inside the ItemTemplate of a RadListBox. Sometimes when selecting, reordering or deleting an Item from the inner ListBox, a javascript error is thrown: "Microsoft JScript runtime error: 'f.getItem(...)' is null or not an object".

    This happens in the Telerik javascript line: 

    d.each(

    this._selectedIndices,function(){if(this!=e){f.getItem(this)._setSelected(false);

    What it seems to me, is that it is trying to deselect an item from the outer RadListBox, which does not exist.

    Short of me adding a null check to your javascript library, can you suggest a way to resolve this problem?

    NOTE: I am using Q1 2010 release.

    Thanks,

    Ben.

    My code is:

     

     

    <telerik:RadListBox ID="lbSelectedTeamStaff"

     

     

    Width="300px"

     

     

    runat="server"

     

     

    AllowDelete="True"

     

     

    AllowReorder="True"

     

     

    AutoPostBackOnReorder="True">

     

     

     

     

     

    <ButtonSettings ReorderButtons="Common" />

     

     

     

     

     

    <ItemTemplate>

     

     

     

     

     

    <div class="ComboTemplate">

     

     

     

     

     

    <strong>

     

     

     

     

     

    <asp:Label ID="lblSelectedTeamName" runat="server"></asp:Label>

     

     

     

     

     

    </strong>

     

     

     

     

     

    <br />

     

     

     

     

     

    <div id="rosterSelectedStaff" class="ComboDetails">

     

     

     

     

     

    <telerik:RadListBox ID="lbSelectedStaff" runat="server" AllowDelete="True"

     

     

    AllowReorder="True" BorderStyle="None" BorderWidth="0px"

     

     

    EnableDragAndDrop="true" >

     

     

     

     

     

    <ButtonSettings ReorderButtons="Common" ShowDelete="true" ShowReorder="False" />

     

     

     

     

     

     

    </telerik:RadListBox>

     

     

     

     

     

    </div>

     

     

     

     

     

    </div>

     

     

     

     

     

    </ItemTemplate>

     

     

     

     

     

    </telerik:RadListBox>

     

  2. Yana
    Admin
    Yana avatar
    4600 posts

    Posted 25 Mar 2010 Link to this post

    Hi Ben Thies,

    Placing one listbox inside the item template of another listbox is not a supported scenario.

    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.
Back to Top