We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag and Drop get items on server side

Thread ID:





130359 May 8,2017 10:25 PM UTC May 9,2017 10:41 AM UTC ASP.NET Web Forms 1
Tags: ListBox
Armand De Lange
Asked On May 8, 2017 10:25 PM UTC


I have created 3 listboxes, 2 on the left, one on the right. The right one is filled with roles from the database, I enabled drag and drop on all the listboxes and that works. But on save I need to retrieve all the items that was dropped into the left 2 listboxes. 

I used listboxread.items, but it does not contains the items.

Here is the code:

                                        <div class="row">
                                            <div class="col-xs-6">
                                                <asp:Label runat="server" AssociatedControlID="listboxRead" CssClass="control-label">Read Permission</asp:Label>
                                                <ej:ListBox ID="listboxRead" runat="server" AllowDragAndDrop="true" ShowRoundedCorner="True" DataSourceCachingMode="ViewState">
                                                        <ej:ListBoxItems Text=""></ej:ListBoxItems>

                                                <asp:Label runat="server" AssociatedControlID="listboxWrite" CssClass="control-label">Write Permission</asp:Label>
                                                <ej:ListBox ID="listboxWrite" runat="server" AllowDragAndDrop="true"  ShowRoundedCorner="True" >
                                                        <ej:ListBoxItems Text=""></ej:ListBoxItems>
                                            <div class="col-xs-6">
                                                <asp:Label runat="server" AssociatedControlID="listboxRoles" CssClass="control-label">Available Roles</asp:Label>
                                                <ej:ListBox ID="listboxRoles" runat="server" AllowDragAndDrop="true"  ShowRoundedCorner="True" ></ej:ListBox>

and on server side:

List<string> newreadlist = new List<string>();

            foreach (var item in listboxRead.Items)

            var readlist = String.Join(",", newreadlist);

            List<string> newwritelist = new List<string>();

            foreach (var item in listboxWrite.Items)
            var writelist = String.Join(",", newwritelist);

Selvamani Sankarappan [Syncfusion]
Replied On May 9, 2017 10:41 AM UTC

Hi Armand, 
Thanks for contacting Syncfusion support. 
We have checked your code example. You need to get the dropped items at server side using server side events. But, currently we haven’t provided any server side events for item drop. So, we have considered this as a defect. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates. 
Selvamani S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon