Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery .NET Get column value from selected row in gridview.

Posted on 2012-04-11
1
Medium Priority
?
578 Views
Last Modified: 2012-04-27
I would like to retreive the value in the second column of a gridview (LogViewsGV) and then
display that value to a label on the screen.  This is only intended to get me going for more
complex data retrieval for my development.  Here's what I have thus far, but just can't seem
to get a working syntax.  Currently the default value "000" is being returned.

$("#<%=LogViewsGV.ClientID %> tr").click(function () { OrderResNum = $("#<%=LogViewsGV.ClientID %> tr:selected").find("td:eq(1)").text() })
GetValue.jpg
0
Comment
Question by:dparkes
1 Comment
 
LVL 83

Accepted Solution

by:
leakim971 earned 1500 total points
ID: 37837228
try this :

$("tr", "#<%=LogViewsGV.ClientID %>").click(function () { OrderResNum = $("td:eq(1)", this).text(); });

Open in new window

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Make the most of your online learning experience.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question