Click here to Skip to main content
14,971,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sallam 2 all;
i hav 2 grids in asp.net n i hav 2 use javascript in it.
my problem is that how selected row of 1 grid is move to 2 grid in javascript?
when i select row from gv1 then i select movebtn ,after cliking btn selected copy of selected row move in gv2 after it when i clik sav btn then it will sav in gv2 database.
plz provide me code
thanx in advance.........


Sallam to all,
I have 3 grids in ASP.NET and I have to use Javascript in it.
My problem is that how can I move a selected row from the first grid is move to 2nd grid using Javascript?
When I select row from GridView1 then I click a "move" button, after cliking the button, the selected row is then copied to GridView2. After it has been copied across, I click the "Save" button which will save GridView2 to the database.

Thanks in advance.
Posted
Updated 27-Jan-10 5:40am
v2

I think I have answered the question..

In continuation to my previous answers,
Are you able to select the row? If yes how are you doing that.
   
diyaa_08 wrote:
plz provide me code


That's not how is works around here.

diyaa_08 wrote:
When I select row from GridView1 then I click a "move" button, after cliking the button, the selected row is then copied to GridView2.


There are two very simple jQuery functions which will do it for you. The clone[^] method, in conjunction with the appendTo[^] function. If you require help with jQuery then read the documentation and play around with it.

diyaa_08 wrote:
After it has been copied across, I click the "Save" button which will save GridView2 to the database.


I suggest you buy a book on ASP.NET. I recommend this:
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional, Second Edition[^]
by Matthew MacDonald
   
v2

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