Pass entire grid row as parameter to another function using Javascript

14 views Asked by At

I have a function on an aspx page that loops through the rows of a grid in Javascript. As I loop through each row, I would like to pass that row as a parameter to another function. Is it possible to pass an entire grid row as a parameter? I'm guessing I would have to declare a variable, and somehow set that variable equal to the grid row, and then pass that variable as a parameter. I'm just not sure how to do that (or if I can do that).

    var testGridView = document.getElementById("testResultsGrid");

    if (testGridView) {
        rows = testGridView.rows;
        rowcount = testGridView.rows.length;

        if (rowcount > 0 {
            for (r = 1, rowcount; r < rowcount; r++) {
                //pass the current row as a parameter to another function
            }
        }
    }
0

There are 0 answers