将jQuery click事件附加到ASP.net中网格视图上的复选框 [英] Attaching a jQuery click event to the check box on a grid view in ASP.net

查看:63
本文介绍了将jQuery click事件附加到ASP.net中网格视图上的复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.net项目.一页具有两个网格视图,两个网格视图都具有一组复选框.如果我选中第一个网格中的复选框,则需要选择第二个网格中的一组复选框.是否有可能通过使用JQuery做到这一点?请帮助我!

I have a ASP.net project. One page have two grid views, both two grid view have set of check boxs. If i select the check box in first grid then a set of check box on the second grid need to select. is it possible to do this by using JQuery? please help me!

推荐答案

您可以使用模板"列将复选框添加到网格,并为onChange事件添加事件处理程序

这样的东西
You could use a Template column to add the checkbox to the grid and add an event handler for the onChange event

Something like this
<ItemTemplate>
  <asp:Checkbox onchange=''Foo();'' />
</ItemTemplate>


这篇关于将jQuery click事件附加到ASP.net中网格视图上的复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆