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

RadGrid Drag & Drop Reordering (Up/Down)

3 Answers 323 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 20 Aug 2009, 07:10 PM
Q: When dragging rows up or down, how do we capture the new index?

With the new drag & drop features of the 2009.Q2 release, is there a simple example of dragging a RadGrid row up or down?  All the online demos drag *between* grids, but even the online demos do not move the row up or down.

I can do all the database stuff, I just need to know what event to hook into when dropping on the same grid, and how to get the new grid index of the dropped row.

Logically it would be something like:
grid1_rowdropped....
    if startingGrid = droppedGrid then
        get index of new location in grid1 that the row was dropped into
            do database stuff here (I can do this once I get the index passed back)

I just need a little nudge in the right direction.
(If anyone is building a simple sample from scratch, a small ToDo list sample would probably be usefull for the community.)

Thank you,
Mike

3 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 21 Aug 2009, 09:50 AM
Hello M,

Please take a look at the RadGrid Items reorder using DB backend code library - it implements the desired by you functionality.

Regards,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
MV
Top achievements
Rank 1
answered on 17 Aug 2016, 03:16 PM

Hi,

I am able to reorder Radgrid on the server side, but now I am trying to do the same on the client side, using ajax. I've seen a lot of demos and documentation but I haven't been able to figure it out. What could be a good way to pass the index before and after it is dropped, and pass the rest of the items (array). Any help will be appreciated.

Thank You!

0
Konstantin Dikov
Telerik team
answered on 22 Aug 2016, 07:44 AM
Hello,

You could refer to the following online demo and documentation for detailed information and example on this matter:
Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
M
Top achievements
Rank 1
Answers by
Mira
Telerik team
MV
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or