I am setting the rows of my grid (which outputs an HTML table) using
jquery

 $('#gvReturnedChecks tr:odd').addClass('odd');
 $('#gvReturnedChecks tr:even').addClass('even');

I am selecting a row in the grid to perform an update.  I perform the
update using an ajax call.  I need to know the index of the node being
updating.

My plan is to use the expression - if (size % 2 == 0) to determine if
this is an even or odd row in order to know what color to set the
background to, by setting the following class:

.addClass('even') or .addClass('odd')

  I have the object of the current table row, by transversing from the
where the 'Select' link was clicked within the row.  I have tried
using the jquery .index() method and rowIndex to no avail - Neither
are returning the index of the row in respect to it's siblings within
the table

Any help is appreciated - I have googled for hours on this and have
been unable to find a solution.  Thanks!

NOTE - Below is the structure of the table row

<tr
onmouseover="this.originalstyle=this.style.backgroundColor;this.style.backgroundColor='#999999'"
onmouseout="this.style.backgroundColor=this.originalstyle;">
                                <td align="center">
                                        <a
id="gvReturnedChecks_ctl02_lnkDelete" class="confirmDelete"
href="javascript:__doPostBack('gvReturnedChecks$ctl02$lnkDelete','')"
style="color:#0066CC;">Delete</a>
                                    </td><td align="center">
                                        <a
id="gvReturnedChecks_ctl02_lnkSelect" class="select"
href="javascript:__doPostBack('gvReturnedChecks$ctl02$lnkSelect','')"
style="display:inline-block;color:#0066CC;width:50px;">Select</a>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblReturnedID"
class="returnedCheckID">7001</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblPlayerName" class="playerName">Jeffrey
Clark</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblCheckNumber"
class="checkNumber">7026844</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblDateCheckIssued"
class="dateCheckIssued">3/2/2009</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblCheckAmount" class="checkAmount">3.00</
span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblDateCheckReturned"
class="dateCheckReturned">3/23/2009</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblClaimNumber"
class="claimNumber">09030200135</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblEnteredBy" class="enteredBy">Bob</span>
                                    </td><td>
                                        <span
id="gvReturnedChecks_ctl02_lblDateEntered"
class="dateEntered">11/1/2009</span>
                                    </td>
                        </tr>

Reply via email to