在两个GridView控件之间拖放行(ASP.NET 2.0) [英] Drag and Drop Rows Between two GridView Control in ( ASP.NET 2.0)
本文介绍了在两个GridView控件之间拖放行(ASP.NET 2.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在ASP.NET 2.0版中的2个GridView控件之间拖放一行功能。
例如。 ,如果我从GridView1拖放一行并删除到GridView2。我如何在GridView2(GridViewClass)中从GridView1获取Row的数据.......
请发表您的想法。
先谢谢......
Hi,
I Need Drag and Drop a Row Functionality Between 2 GridView Control in ASP.NET Version 2.0.
Eg., If i Drag a Row from GridView1 and Drop to GridView2. How i will get the data of Row from GridView1 in the GridView2 (GridViewClass) .......
Please post your ideas.
Thanks in Advance......
推荐答案
这不是很难。我为你解释了一些步骤。
1)。在javascript中编写一个方法来复制数组中的当前行单元格值(当鼠标按下时,将在源行上触发此函数)。
2)。在javascript中编写一个方法,将复制的值从数组粘贴到目标行单元格(当鼠标向上触发目标行时,将调用此函数)。
注意:可能会发生一些验证,例如当目标行上的鼠标点火时,数组是否包含数据
我不在这里编写代码,因为我想要你自己尝试自己制作电池。如果你在编写代码时遇到更多问题,那么我将提供完整的代码。
Dinesh Tailor
高级软件工程师
it's not very hard. i explains some steps for you.
1). write a method in javascript to copy the current row cells values in an array (this function will be called when mouse down will fire on source row).
2). write a method in javascript to paste the copied values from array to destination row cells (this function will be called when mouse up will fire on destination row).
Note: some validations may takes place e.g. Array contains data or not when mouse up fire on destination row
i m not writing code here because i want that u self try it to make batter yourself. if u found more problems while writing code then i will provide complete code.
Dinesh Tailor
Sr. Software Engineer
您可以使用jQuery执行此操作。检查连接列表 [ ^ ]。
同时检查所有链接 - Re:如何将一行从网格视图拖放到asp.net中的另一个网格视图 [ ^ ]
You can do this using jQuery. Check Connect Lists[^].
Also check all the links in - Re: How to drag and drop one row from grid view to another grid view in asp.net[^]
这篇关于在两个GridView控件之间拖放行(ASP.NET 2.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文