Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to add a link to a grid view in entity framework?I am displaying data in grid view but I want a link on every line if you click on link it will take your id and show a text box there you will enter data .If you click on save it save the data in database for the corresponding id in entity framework database approach.

What I have tried:

i am able to display the data in grid view but unable to give link in the right side and if you click it will take your id and text box will be display.
Posted
Updated 4-Feb-16 19:13pm
v2
Comments
[no name] 5-Feb-16 0:18am    
If you want link in gridview then follow below link:

http://www.aspsnippets.com/Articles/How-to-bind-and-pass-query-string-in-HyperLink-in-GridView-in-ASPNet.aspx
John C Rayan 5-Feb-16 1:11am    
I would suggest not to use gridview in MVC but webgrid or jqgrid. You are mixing the old and new technology.
Member 12300401 5-Feb-16 4:32am    
yeah i am using that but unable to send data from web grid to controler giving action link
Member 12300401 5-Feb-16 12:41pm    
i have tried this grid.Column(columnName: "Action", format: (item) => Html.ActionLink("Manage Goals", "Managaekrasgoals", "ManageKrasGoals"))

but unable to get data in controler

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