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

Remove an item from a listbox client side asynchronously

1 Answer 57 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Deivison Julio
Top achievements
Rank 1
Deivison Julio asked on 20 Apr 2012, 10:05 PM
How to remove an item from a listbox client side asynchronously? I'm using RadAjaxManager, but I have to click the button 2 times to remove the item. 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="True">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RemoveFeed">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListBoxFeeds" LoadingPanelID="ajaxLoading" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManage>

<telerik:RadListBox AppendDataBoundItems="true" runat="server" ID="ListBoxFeeds"
                CssClass="boxComments" AutoPostBack="True" RegisterWithScriptManager="True" AllowReorder="False"
                AllowTransfer="False" EnableDragAndDrop="False"
                AllowAutomaticUpdates="True">
       <ItemTemplate>
                            <asp:Button ID="RemoveFeed" OnClick="removeFeed_Click" CssClass="removeItem" runat="server"
                                Text="Test"/>
       </ItemTemplate>
            </telerik:RadListBox>

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 25 Apr 2012, 12:11 PM
Hi,

To resolve the issue set the AutoPostBack property of RadListbox to false.
 
All the best,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListBox
Asked by
Deivison Julio
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or