Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 12th, 2006, 08:35 PM
SP
Guest
 
Posts: n/a
Default GridView or HyperLinkField with call to a javascript function

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
  #2  
Old September 12th, 2006, 10:35 PM
KJ
Guest
 
Posts: n/a
Default Re: GridView or HyperLinkField with call to a javascript function

Try something like:

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

SP wrote:
Quote:
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
  #3  
Old September 13th, 2006, 05:55 PM
SP
Guest
 
Posts: n/a
Default Re: GridView or HyperLinkField with call to a javascript function



KJ ha scritto:
Quote:
Try something like:
>
<asp:HyperLinkField NavigateUrl="javascript:alert('hi there');"
Text="Hi There" />
>
SP wrote:
Quote:
>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".
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles