Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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......
Posted
Updated 2-Dec-12 4:10am
v12

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
 
Share this answer
 
Comments
kanna.kannanbe 22-Sep-12 1:03am    
Thanks for your Feed back: Dineshshp

I already implemented (Drag and Drop Functionality )with jQuery,but what i am facing problem is , how to get the data for that droped row in the Second GridView2,using GridViewRow Class.Here i am using FindControl Function for finding the data from the Droped Row from Gridview1.
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[^]
 
Share this answer
 
Comments
kanna.kannanbe 22-Sep-12 1:05am    
Thanks for your Feed back : Tadit Dash
Please don't forget to mark this as accepted answer, if it has helped you in any way, so that it will be helpful for others to know the solution easily... You will also be awarded with points for accepting... :) :)
Thanks a lot...

Regards,
Tadit

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900