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

General Feedback ID:437147 -- Drag and Drop control with the Reordering

1 Answer 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Samir Patel
Top achievements
Rank 1
Samir Patel asked on 04 Jul 2011, 09:16 AM
Hello,

I have posted the Query on incorrect category " General Feed back", so here i paste the whole thread by correcting the category "RAD GRID" , Please help me out on this...

  • Telerik Admin

    Posted on 47 minutes ago

    Hello Samir,

    You sent this question as general feedback. If you need an answer or help with a specific requirement, please send a support ticket for RadGrid. This is the best way to get a precise and to-the-point advise expediently.

    All the best,
    Peter
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  • Samir Patel

    Posted on on Jun 28, 2011

    Hello,

    I am Using the Licence version, This licence is purchased by my client

    and also for the Drag and Drop , i am Using below Example:

    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx 


    Only I need to add two things in this , first is remove the item by drag from right to Left, and second the Move Up / Down arrow to rearrange...

    Regards
    Samir
  • Telerik Admin

    Posted on on Jun 28, 2011

    Hi Samir,

    Thank you for writing.

    Before getting to your question, we would like to check something related to your license. Your account shows no purchases and it seems that you have not downloaded the WinForms suite from our site. Since it is our policy to support users in good account standing, I will ask you to give us more details on the license you are using:

    - In case you have downloaded it from another site, please let us know so that we can update your account and provide you with proper support services;
    - In case you have obtained a copy of our controls through the company you work for, please ask the purchase holder to add you as a License Developer to the purchase. This will give you full access to the products your company has purchased, to our downloads section, and to our support ticketing system. Additionally, all your questions will be reviewed according to the license you have. More information on License Developers you can find here: www.telerik.com/faq.

    I have moved your Forum post to our support ticketing system to avoid sharing any private information in the public Forums. You can find the ticket in Your Account.

    As to your first question, I would kindly ask you to provide some more details such as, which Telerik controls are you using to drag from / to and which demo are you referring to. It would also be very helpful if you can prepare a sample project where you reproduce the unwanted behavior and an explanation of what the proper behavior is.

    On your second question. You can add an extra column in your DB table, storing the items. In this extra column you can save the order in which you want to display the items. When you visualize the items later you need to just order them by this extra column.

    I have converted your forum post to a support ticket so you can add an attachment.

    I am looking forward to your reply.

    Regards,
    Ivan Petrov
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  • Samir Patel

    Posted on on Jun 23, 2011

    Hello,

    I have added drag and drop control, but i cannot do following two things, please help me on that

    1) When i drag any item from right to left, then I cannot drag the same item from right to left. I have checked in the Demo of this , but its also having same problem, in the demo they provide Recyclebin, to delete, but my client doesn't want this...He just Drag from Left to right same way from Right to Left

    And second one

    2) Also When i drag from Left to right, i need to Rearrange the Items on the Right and save this ordering arrangment in to DB, so that i will show in this saved order on my other website...


    Regards
    samir


1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 07 Jul 2011, 08:36 AM
Hi Samir,

Regarding your first question:

In order to achieve the desired functionality concerning drag-drop from the right grid to the left you need to implement the same logic as the logic for dragging left to right. For example on the mentioned demo the client onRowDropping event is canceled if the sender is not grdPendingOrders or the item from the right grid is not moved to the recycle bin:
function onRowDropping(sender,args) {
if(sender.get_id()=="<%=grdPendingOrders.ClientID %>") {
   ....
  }
else {
         ....
if(!isChildOf('trashCan',node)) {
args.set_cancel(true);
        }
          ....
       }
     }

Also on the server you need to implement logic for inserting item into the data source of the left grid into the grdShippedOrders_RowDrop event handler (similar to the logic into grdPendingOrders_RowDrop event handler).

Regarding your second question:
You could use the approach suggested by my colleague Ivan Petrov. You can add an extra column in your database table which keeps the order of all items. When the row is dropped from one grid to another you could change the values in this column and show the items in the order which you want.

Please give the suggestions try and let me know if you experience any problems.

Regards,
Radoslav
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Samir Patel
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or