如何在 C# ASP.net 中创建 DataGrid,以便您可以拖放行以重新排序。我想使用工具箱中的实际 DataGrid 工具,而不是相似的。
问问题
345 次
1 回答
1
这是演示!
正如大卫所说,您可以使用 JQuery 拖放 DataGrid'Rows !
<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();
});
您可以在这里找到完整的参考资料:)
祝你好运!
于 2013-07-17T05:33:15.020 回答