如何在C#ASP.net中创建一个DataGrid,以便拖放行以重新排序。我想使用工具箱中的实际DataGrid工具,而不是类似的工具。
这里是演示!
正如David所说,您可以使用JQuery来拖放DataGrid的行!
<script type="text/javascript">
$(function () {
$(".drag_drop_grid").sortable({
items: 'tr:not(tr:first-child)',
cursor: 'crosshair',
connectWith: '.drag_drop_grid',
axis: 'y',
dropOnEmpty: true,
receive: function (e, ui) {
$(this).find("tbody").append(ui.item);
}
});
$("[id*=gvDest] tr:not(tr:first-child)").remove();
});
您可以在这里找到完整的参考资料:)
祝你好运