By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,851 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

GridView or HyperLinkField with call to a javascript function

P: n/a
SP
Hi,
I need a GridView that when I click on a row or on a HyperLinkField a
javascript call raise .
It is possible?

The grid is in a window open from a parent window. Onclick in a row
selected, a field in a opener is fill with the data of the row selected.

Thanks
Sep 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
KJ
Try something like:

<asp:HyperLinkField NavigateUrl="javascript:alert('hi there');"
Text="Hi There" />

SP wrote:
Hi,
I need a GridView that when I click on a row or on a HyperLinkField a
javascript call raise .
It is possible?

The grid is in a window open from a parent window. Onclick in a row
selected, a field in a opener is fill with the data of the row selected.

Thanks
Sep 12 '06 #2

P: n/a
SP


KJ ha scritto:
Try something like:

<asp:HyperLinkField NavigateUrl="javascript:alert('hi there');"
Text="Hi There" />

SP wrote:
>Hi,
I need a GridView that when I click on a row or on a HyperLinkField a
javascript call raise .
It is possible?

The grid is in a window open from a parent window. Onclick in a row
selected, a field in a opener is fill with the data of the row selected.

Thanks


It seem not work, I have a link as :
<asp:HyperLinkField DataTextField="Field1" HeaderText="ID"
SortExpression="Field1"
NavigateUrl="javascript:returnData('{0}','{1}');"
datanavigateurlfields="Field1,Field2" target="_top"/>

In a GridView,but result is a link to "Field1".
Sep 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.