Geeks With Blogs

@azamsharp
  • azamsharp The WWDC app says that there are new videos but there is nothing under videos!!! about 412 days ago
  • azamsharp Can I post my opinion on iOS 7 Beta or is it under NDA or something? about 412 days ago
  • azamsharp iOS 7 BETA installed successfully! about 412 days ago
  • azamsharp iOS 7 BETA installed! Now restoring! I am on NET10 which uses AT&T network. Hopefully 3G will still work! Lets c.. about 412 days ago
  • azamsharp The missing of button borders in Xcode 5 makes it hard to determine the clickable area. about 412 days ago
  • azamsharp I might wait for iOS to be released before I can put it on my device! Don't want a bricked or unstable device! about 412 days ago
  • azamsharp Android has many features that no one uses, number of versions that no one upgrades to and thousands of apps that no one pays for. about 412 days ago
  • azamsharp Maybe it is just me but the new iOS 7 UI looks like Windows Phone 8 UI! #maybeIamCrazy about 412 days ago
  • azamsharp Anyone using H20 network upgraded to iOS 7 BETA Keep me updated if you face any problems. about 412 days ago
  • azamsharp @merowing_ You already downloaded it! I cannot even load the developer's website! :( about 413 days ago

AzamSharp Some day I will know everything. I hope that day never comes.

Selecting checkboxes inside the GridView control is a very common operation and that is why I have several articles and videos dedicated to this subject.

Selecting CheckBoxes Inside GridView With a Twist

VIDEO: Selecting CheckBoxes Inside GridView

Recently, I was playing around with JQuery library and thought of implementing the same scenario using the library. Here is the code used to perform the SelectAll and DeSelectAll function.

<script language="javascript" type="text/javascript">

$(document).ready(function()
{
    $("#chkAll").click(function()
    {
        // I don't like this line!    
        this.checked = !(this.checked == true);
   
        $("#gvCategories input:checkbox").attr("checked",function()
        {
            this.checked = !(this.checked == true);
        });
       
    });
});
</script>

Yup! that's all the code you need to perform this operation. If you think you can even refactor this out then please post your refactorings at Selecting CheckBoxes Inside the Table.

Posted on Saturday, May 10, 2008 10:52 AM | Back to top


Comments on this post: Select All CheckBoxes in GridView Using JQuery

# re: Select All CheckBoxes in GridView Using JQuery
Requesting Gravatar...
Thanks. Helped allot
Left by KM Web Design Blog Melbourne on May 11, 2008 3:10 AM

Your comment:
 (will show your gravatar)
 


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net | Join free