tags:

views:

15

answers:

1

I need to Get the Entire Row values when I click on jquery grid row.. here is the code I am using for that

 var RowClick = function(e) {
       var resultArray = $("#Grid td:first:child").closest('tr').find('td').map(function() {
              alert(resultArray);
            });
        };

For this RowClick I defined in Grid property server side for the jquery grid

grid.ClientSideEvents.RowSelect = "RowClick";

Can any one tell me on click on Row I need to get entire values or 4th and 5th columns values?

thanks

A: 

Have you looked into using the jQuery keyword .each?

<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script> 

<script>

    $(document).ready(function() {
        $('.Grid').click(function() { $(this).find('td').each( function() { alert($(this).html()); }) })
    });
</script>

<table>
    <tr class="Grid">
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
        <td>5</td>
    </tr>
</table>
griegs