Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8309391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:06:11+00:00 2026-06-08T19:06:11+00:00

I have a HTML table where the first column is a checkbox, I have

  • 0

I have a HTML table where the first column is a checkbox, I have a hyper link above the table which says “check all” if they click this I need to loop through each row in the table and check the checkbox assigned to that row, the table is build on page load “Databind”.

This is my jQuery so far I’m calling it off the “Check All” link:

$('#HypSelectAll').click(function() {
    var count = $('#gvPerformanceResult>tbody>tr').length; //Count the amount of rows in the HTML table
    for (i = 0; i < count; i++) {

    }
});​

I’m now not sure how I can reference the gvPerformanceResult columns…. to find the checkbox which is called “chkExportToExcel” this table could have 1-25 rows. Can someone help me out of give me a starting point?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:06:13+00:00Added an answer on June 8, 2026 at 7:06 pm

    No need to manually do the loop. Let jQuery do its thing:

    $('#HypSelectAll').click(function () {
        $('#gvPerformanceResult')
           .find('input[type="checkbox"]')
           .prop('checked', true);
    });
    

    If there are other checkboxes throughout the table, and you really must be that specific, try this:

    $('#HypSelectAll').click(function () {
        $('#gvPerformanceResult')
            .find('> tbody > tr > td:first-child > input[type="checkbox"]')
            .prop('checked', true);
    });
    

    But I can’t really think of a scenario that could warrant something like this. If you have to resort to this, you might be having some deeper problems in your HTML structure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an HTML table in which the first column's cells each contain a
I have an HTML table with a link in the first column. I want
I have an ordinary HTML table: <table> <tr> <td class=first-column-style>FAT</td> <td>...</td> </tr> <tr> <td
I have a HTML table where each row has two columns. First column is
I have HTML table with 10 rows and which has a Current Value column
I have created an HTML table with two columns. I want the first column
I'd like to have (at a minimum) the first column of my HTML table
In my html table I have two row, first row having no css but
I have this html table: <table class=table-all> <tbody> <tr> <td>BISFENOLO</td> <td>Bisfenolo-AF 10/10</td> <td class=right>€
I have a HTML table with a column per row with this html code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.