Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...
I am using Gridview1 with fields Code,Name and Amount and checkbox field. I am binding Gridview1 with database...Now i am passing selected checkbox rows of gridview to another Gridview2.This works fine.
But now i want to edit the Amount field in gridview but i don't want to update Database...just waana pass selected rows with edited values to Gridview2, and then save all rows of Gridview 2 to database.
how to edit values in Gridview1 without editing database....and then pass to Gridview2.

Plzz help me...
Posted

"how to edit values in Gridview1 without editing database"...
Database update will only happen when you trigger an update. It won't update automatically. Don't put that trigger, simple!

Have two gridviews. Make a change in first one and pass on the changes to second one. Once you are done with second gridview, fire an update statement in database with the values of gridview two as desired.
 
Share this answer
 
maybe you can use a local datatable for manipulating locally your data in GridView1 without any change in database :

0) retrieve data from database
1) store datatable locally in memory in Cache or ViewState (I think if you use Session can create problem with large data, also you can forget it)
2) don't bind autocratically your GridView1 to database, use local datatable.
3) make change as you like.
4) pass it to GV2
5) update you DB.
 
Share this answer
 
Can you please send me the Code.I am kindly new at this. I am not able to change the Gridview cell values on Checkbox selected event.
 
Share this answer
 

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