Show Posts
|
|
Pages: [1]
|
|
4
|
General Category / General Discussion / Re: Is it possible to use drag and drop in datagrid and save the data in new order
|
on: September 18, 2012, 06:06:49 AM
|
|
To get whole position of the datagrid after drag and drop use following code...
$('#dg').datagrid({ onLoadSuccess:function(){ $(this).datagrid('enableDnd'); }, onDrop:function(destRow,sourceRow,point){ var newPosIds = []; $('#dg').datagrid('selectAll'); var rows = $('#dg').datagrid('getSelections'); for(var i=0; i<rows.length; i++){ newPosIds.push(rows.id); } alert(newPosIds); $('#dg').datagrid('unselectAll'); } });
newPosIds gives you New Position of all ids of the grid... Hope it will help you... Enjoy!!!!!
|
|
|
|
|