jQuery: Get row and column index of a GridView Cell

In this post, Find jQuery code to get Row Index and Column Index of ASP.NET GridView Cell on click or on mouseover event.

Related Post:

To get the row and column index, attach mouseenter event to all tr and td of ASP.NET GridView. And using jQuery closest() find count of all the previous respective element.
$(document).ready(function () {
  $("#gdRows tr td").mouseenter(function () {
     var iColIndex= $(this).closest("tr td").prevAll("tr td").length;
     var iRowIndex = $(this).closest("tr").prevAll("tr").length;
   });
});
Keep in mind that both index starts from 0.
See Complete Code
Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..