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?
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:
All Courses

From novice to tech pro — start learning today.