AutoPostBackOnTransfer set to 'false' cuase RadListBox not able to keep correct items

3 posts, 0 answers
  1. Yang
    Yang avatar
    2 posts
    Member since:
    Dec 2017

    Posted 12 Dec 2017 Link to this post

    We have a project using 2 RadListBoxes to transfer items each other as below. when we double-click an item in one list, the item will be transferred to another list. That works very well. But in server side code, the number of items in each box is not correct. I tried to create an event handler for OnClientDoubleClicking and OnClientDoubleClicked to track and commit the changes. But it is still the same error.  Can someone help on this? Thanks.


    <p><telerik:RadListBox runat="server" ID="rlbUnselectedStatus" AutoPostBackOnTransfer="false"<br>                            AllowTransfer="true" AllowTransferOnDoubleClick="true" TransferToID="rlbSelectedStatus"<br>                            DataTextField="StatusName" DataValueField="StatusId" CausesValidation="false"<br>                            SelectionMode="Multiple" Height="120px" Width="240px" TabIndex="1"  /></p><p><br>                        <telerik:RadListBox runat="server" ID="rlbSelectedStatus" AutoPostBackOnTransfer="false"<br>                             AllowTransfer="true" AllowTransferOnDoubleClick="true" TransferToID="rlbUnselectedStatus"<br>                            DataTextField="StatusName" DataValueField="StatusId"  CausesValidation="false" <br>                            SelectionMode="Multiple" Height="120px" Width="210px" TabIndex="1" /></p>
  2. Yang
    Yang avatar
    2 posts
    Member since:
    Dec 2017

    Posted 13 Dec 2017 in reply to Yang Link to this post

    Let me provide more info. We also have a button (we call it 'search button' below)  to trigger the postback. in the event handler of that button. These 2 lists are to be used as one of the conditions for DB query.

    When the page is initially loaded, e.g. list rlbUnselectedStataus has 8 different items. And rlbSlectedStatus is empty. We double-click 2 items in unselected list and these 2 items will be transferred to selectedlist. Then we click the search button to get some result. Until this step. everything is ok. But when we click one item in the selected list, now the total number of items in selected list should be 1. When I click the search button again, the items in unselected list is now 3 items (2 duplicate items for the current-still-in-selected-list  and one for the just-transferred). So the query result is still same with the previous one.

  3. Peter Milchev
    Peter Milchev avatar
    693 posts

    Posted 18 Dec 2017 Link to this post

    Hello Yang,

    We tried to replicate the scenario based on the provided code snippet and description but we were unable to replicate the issue as demonstrated in this screencast.

    Attached is the sample project we used to record the screencast.

    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top