开发者

javascript to select all checkbox in gridview

开发者 https://www.devze.com 2023-04-07 10:28 出处:网络
i 开发者_开发问答am searching for the javascript that performs select all - deselect all feature in asp.net gridview.

i 开发者_开发问答am searching for the javascript that performs select all - deselect all feature in asp.net gridview.

So if a header checkbox is selected all the item templates checkbox should be selected. if any item template checbox is deselcted, the header checkbox should also be deselected.

Thanks


$('#GridView1 input[type=checkbox]').each(function(){
this.checked=!this.checked;});

Add this on 'select all' button click

0

精彩评论

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