Radlist Item Client Side problem wirh list array...

3 posts, 0 answers
  1. Moksha
    Moksha avatar
    10 posts
    Member since:
    Jan 2011

    Posted 07 Mar 2011 Link to this post

    Hi.....

    I have 2 radlistbox

    using javascript ---On click of Add button i am transftering data from radlistbox 1 to radlistbox 2........

    After transfttering item in radllistbox2 radlistitem2's item.set_checked(true) doesn't work..... list items remains as it is as un check....
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Mar 2011 Link to this post

    Hello Moksha,

    I am not quite sure about the method that you tried o transfer the items.Here I am pasting the two approaches that I tried.

    Method1:Using the built-in property AllowTransfer="true"
    aspx:
    <telerik:RadListBox ID="RadListBox1" runat="server"
            TransferToID="RadListBox2" AllowTransfer="true"  CheckBoxes="true" >
            <Items>
                <telerik:RadListBoxItem Text="Argentina" />
                <telerik:RadListBoxItem Text="Australia" />
                <telerik:RadListBoxItem Text="Brazil" Selected="true" />
                <telerik:RadListBoxItem Text="Canada" />
            </Items>
     </telerik:RadListBox>
    <telerik:RadListBox ID="RadListBox3" runat="server" CheckBoxes="true">
    </telerik:RadListBox>

    Method2:Transfer Items on external button click.
    <telerik:RadListBox ID="RadListBox1" runat="server" EnableDragAndDrop="true"
            TransferToID="RadListBox3"  CheckBoxes="true" >
            <Items>
                <telerik:RadListBoxItem Text="Argentina" />
                <telerik:RadListBoxItem Text="Australia" />
            </Items>
     </telerik:RadListBox>
    <telerik:RadListBox ID="RadListBox3" runat="server" CheckBoxes="true">
    </telerik:RadListBox>
    <asp:Button ID="Button1" runat="server"  OnClientClick="OnClientClick();" />

    JavaScript:
    function OnClientClick()
     {
         var listbox = $find("<%= RadListBox1.ClientID %>");
         var item = listbox.get_selectedItem();
         listbox.transferToDestination(item);
     }
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Moksha
    Moksha avatar
    10 posts
    Member since:
    Jan 2011

    Posted 08 Mar 2011 Link to this post

    Hi Shinu

    Thanks for replay

    I have already tried this method. actually my probem is i have created radlistbox using javascript at client side .... it's items do not get reflectet without postback. and i want item get reflect without postback....

    if i use listbox.transferToDestination(item) or listbox.get_iteams.getitems.add(item) both give me an index error  during saving data
Back to Top