开发者

C#: How set "on row command" event handler of a gridview dynamically?

开发者 https://www.devze.com 2023-01-10 14:35 出处:网络
Can I change \"on row command\" event handler of a gridview 开发者_运维知识库dynamically from code and in run time?

Can I change "on row command" event handler of a gridview 开发者_运维知识库dynamically from code and in run time? I use C#

Thanks


Just add your handlers somewhere in your code where you want changed (perhaps in a click event handler). If necessary, remove your old handler beforehand.

gridView.RowCommand -= MyOldRowCommandHandler;
gridView.RowCommand += MyNewRowCommandHandler;
0

精彩评论

暂无评论...
验证码 换一张
取 消