2.0 GridView: How to get SelectedIndex-property on the client

How to get SelectedIndex property on the client (Javascript)?
In 2.0, the page contains a GridView and ODS. Basically, I need to to identify the selected row in the client browser to implement some js functions.
LVL 36
Miguel OzSoftware EngineerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

thaytu888888Connect With a Mentor Commented:
-In js code, use: var index = <%=grdName.SelectedIndex%>;
On a gridview, I think its the SelectedRow method that gives you what you want. That call returns a GridViewRow object.

You can then use this to get the row number. I think its RowIndex

yourgrid.SelectedRow.RowIndex might do it

something like that anyways
Miguel OzSoftware EngineerAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.