ASP.Net 拖放 DataGrid 行
我在网上搜索此内容已经有一段时间了,但找不到任何有用的东西。
我需要一个允许从客户端拖放行的网格。这将触发一个事件,以便我可以更改数据库中的值(项目顺序)。
有人能指出我正确的方向吗?
我对这个问题有点模糊,因为我还没有为此做任何设置,所以没有任何已知的限制。
I've been searching the web for this for a while but can't find anything useful.
I need a grid that allows dragging and dropping of rows from the client side. Which will fire an event so I can change a value (the item order) in the database.
Can anyone point me in the right direction?
I'm a bit vague with the question because I've got nothing set up for this yet so don't have any known limitations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我花了一段时间才弄清楚,但我终于实现了它:
使用 TableDnD jQuery 插件来允许拖动和拖动。将 GridView 行拖放到客户端: http:// /www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
实现以下解决方案以在服务器端获取新的行顺序,最后将更改更改为这数据库: http://aspdotnet-example .blogspot.com/2011/10/gridview-reorder-row-drag-and-drop.html
如果有些内容不够清晰,请告诉我。
It took me a while to figure it out, but I finally implemented it:
Use the TableDnD jQuery plugin to allow drag & drop the GridView rows in the client side: http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
Implement the following solution to get the new row order in your server side and finally take the changes to the database: http://aspdotnet-example.blogspot.com/2011/10/gridview-reorder-row-drag-and-drop.html
Let me know if something is not clear enough.