Basically in my table I have a column that is ordered and this always stays the same no matter the drag and drop. So when, for example, row 6 was dragged to row 1 I needed to update this column to reflect it's new order. This wasn't hard. But when that column was sorted it didn't take into account the new order.
Out of interest, do you have an example that you would be willing to share, or even just the initialisation code? This would be quite a nice demo for DataTables...
I have also created one row drag'drop plugin. You might take a look at the http://jquery-datatables-row-reordering.googlecode.com/svn/trunk/index.html.
I had a requirement to drag a row from one jquery data table and drop it on another jquery datatable. I'm using a jquery datatable knockout binding to (http://knockoutjs.com/) bind data to the data tables. The table tr are draggable through jquery ui draggable.
I have also added a helper property to draggable so I override the default drag clue.
i.e:
('#table').draggable{
helper: function(e) {
return $("");
}
}
This work totally fine in chrome and firefox. but the drag clue doesn't appear in IE. Any solution for this?
Replies
Basically in my table I have a column that is ordered and this always stays the same no matter the drag and drop. So when, for example, row 6 was dragged to row 1 I needed to update this column to reflect it's new order. This wasn't hard. But when that column was sorted it didn't take into account the new order.
[code]
$('#table tbody tr').each(function(i)
{
var startPos = table.fnGetPosition(this);
table.fnUpdate(i+1, startPos, 1);
});
[/code]
Works great :)
Very nice - good to hear you got it "sorted" :-).
Out of interest, do you have an example that you would be willing to share, or even just the initialisation code? This would be quite a nice demo for DataTables...
Regards,
Allan
Absolutely. I am in the process of building an example of this. Will notify you when it's complete.
Thanks,
Jeff
Thanks
thanks.
Thanks,
I have also created one row drag'drop plugin. You might take a look at the http://jquery-datatables-row-reordering.googlecode.com/svn/trunk/index.html.
Jovan
I had a requirement to drag a row from one jquery data table and drop it on another jquery datatable. I'm using a jquery datatable knockout binding to (http://knockoutjs.com/) bind data to the data tables. The table tr are draggable through jquery ui draggable.
I have also added a helper property to draggable so I override the default drag clue.
i.e:
('#table').draggable{
helper: function(e) {
return $("");
}
}
This work totally fine in chrome and firefox. but the drag clue doesn't appear in IE. Any solution for this?
Dinusha