How to tick a Checkbox in ASP.NET GridView without going to Edit mode

最后都变了- 提交于 2019-12-12 04:37:34

问题


I have a Checkbox template column in a ASP.NET 3.5 GridView. Now the user has to click 'Edit', tick the Checkbox, then click the 'Update' or 'Cancel' button, which raises an event that we use to update database.

Is it possible to just check the box without going into Edit mode at all and raise a Checked event so that we can update database ? Alternately we can iterate through all rows, identify ticked rows and update them to DB in a loop.

Any pointers helpful.

Thanks, Chak.


回答1:


Try,

Row click event of gridview...

Ref this c# gridview row click



来源:https://stackoverflow.com/questions/1951122/how-to-tick-a-checkbox-in-asp-net-gridview-without-going-to-edit-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!