Click here to Skip to main content
15,895,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have gridview columns (id, Empid, EmpName, BalanceLeaves, leaveid, From, To, Days, Reason, Supervisor, Address, ContactNo, Applied remarks).

I have checkboxes in every row of gridview.
I want to check some rows and if I click on approve button checked rows should insert in table using entity framework.

Please give some idea.
Posted

1 solution

Don't you want to use a "foreach" loop, the simple and easy logic looping through each row, checking against the checkbox (template column) and if checked initialize the entity and add it to List object of the entity, finally using entity frameworks entity service save the collection object directly.

hope this helps you.
 
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