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

Drag and Drop value from one cell of grid to another cell

3 Answers 455 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sheo
Top achievements
Rank 1
Sheo asked on 07 Mar 2013, 02:23 PM
Hi,
I am new to Kendo and started working with the trial version. I have a scenario where in a Grid User should have the ability to drag value from one cell in grid to another cell and also drag one cell value from one grid to another. I have tried searching but cudn't finad any such demo. I have used this demo http://jsfiddle.net/JBeQn/ 
I tried changing the source but it is not working. Currently when i drag and drop in the grid in demo value of two columns are dragged i just need that only one value , say only value of text column should be dragged. 
I surely think I can get lots of input on this here.
Thanks

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 11 Mar 2013, 02:14 PM
Hello Sheo,

Kendo Grid does not support drag-n-drop reordering out of the box. The example that you found uses KendoUI Drag and Drop component to achieve similar functionality.

I am not sure if I understood correctly what exactly you would like to achieve. If you want to drag the value of only one column you can make only the corresponding cell draggable or customize the hint used in the jsFiddle example. For more information please check the Draggable API reference.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mark
Top achievements
Rank 2
answered on 11 Mar 2013, 05:22 PM
I have the same question that the original poster had regarding drag-and-drop between two grids. I also am on a Trial period for now, my company has a full version of DevCraft Ultimate and we are planning on using KendoUI for our next generation application, largely because we have been impressed with your responsiveness in these forums in the past.. 

My search of the web has turned up very little examples for this scenario. I am a newbie with jQuery/jscript, and could use a working example of this scenario using KendoUI. I'm coming from a ASP.NET web forms background, now using ASP.NET MVC 4 for the first time.

Ultimately, my app will need to know the database key (at a minimum) of the row being "dragged", So, it would be nice if the example could include source data to be received by the "drop" target cell.

Thanks for you help.
Mark Northup
0
Alexander Valchev
Telerik team
answered on 13 Mar 2013, 04:34 PM
Hello guys,

I updated the example so it shows how to get the dataItem of the row that is currently being dragged.
hint: function(e) {
    var dataItem = grid.dataItem(e); //get the dataSource item
    return $('<div class="hint">ID: ' + dataItem.id + '</div>'); //build the hint
}

You can test the solution here: http://jsbin.com/itawuq/2/edit

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Sheo
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Mark
Top achievements
Rank 2
Share this question
or