How can edit the gridview cell value on click of the gridview cell, in ASP.NET?
In my website, I have a gridview which has datasource dynamically bound from database table.
Now I want that when a user clicks in a cell of the gridview it becomes editable and he can edit the cell values and update the database accordingly开发者_开发问答.
I don't wish to use the in-built edit, delete and update buttons of gridview. How can I do that?
- Inside awareness cell declare (for example) div or span with specified ID.
- Using javascript declare
onclick
handler for this div/span - Follow this simplest example http://weblogs.asp.net/mnolton/archive/2003/06/04/8260.aspx
I guess if you catch the client side click on the grid you can them force a post back in which you set the selected row to edit mode. Is this what you want to do?
精彩评论