how to get checkbox value in gridview in javascript

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3040
    Pavan
    Member

    how to get checkbox value in gridview in JavaScript?

    #4624

    You can use the jquery like the following:
    [code title=””] var $checkedCheckBoxes = $(‘#GridView1’).find(“input:checkbox:checked”);[/code]

    however you need to clarify more your question.

    #4625

    You can also use the for loop over the rows of the grid.

    [code title=”JavaScript”]var grid = document.getElementById(“<%= grdRecord.ClientID %>“);
    if (grid.rows.length > 0) {

    for (i = 1; i < grid.rows.length; i++) {var inputs = grid.rows[i].getElementsByTagName('input'); if (inputs[0].checked = true) {// Write your logic here } }[/code]

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.