Geeks With Blogs

@azamsharp
  • azamsharp @mkoby 15 days for return and 15 days for replacements. Still awful. about 15 hours ago
  • azamsharp @mkoby I purchase Google Chrome book (Crappiest device on the planet) and by they refused to take it back after only 15 days :( about 15 hours ago
  • azamsharp @mkoby yeah 15 days for a warranty is pretty awful!! about 15 hours ago
  • azamsharp @mkoby I am thinking of buying one from Google. My experience with Google customer service has always been horrible. about 15 hours ago
  • azamsharp Has anyone bought Nexus 4 directly from Google? Where can I read about warranty since Google is pretty bad at customer service. about 15 hours ago
  • azamsharp @GardenVeggies Hey Kenny, Did you get a chance of trying out Vegetable Tree iPhone app? about 21 hours ago
  • azamsharp @soffes These people are called "Open Source Hyenas" about 2 days ago
  • azamsharp @soffes Happened to me twice in 12 months. Usually it will take 7-10 days for that app to go down. about 2 days ago
  • azamsharp @mkoby I will :) Just for the sake of the experience :) about 2 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