?
Solved

Call Javascript function in datagrid's hyperlink column

Posted on 2004-08-11
4
Medium Priority
?
762 Views
Last Modified: 2008-01-16
I want to use Javascript to open a page in a new, sized, window. I have a hyperlink column in my datagrid to do this, and basically want to call a Javascript function EditPage with the ID column as the parameter:

    EditPage({0})

How do I set this up in the Property Builder of Visual Studio .Net?
0
Comment
Question by:crescendo
3 Comments
 
LVL 4

Expert Comment

by:marko020397
ID: 11777713
I think you will have to use TemplateColumn. For hyperlink in column use <%# DataBinder.Eval (container.DataItem, "ID") %> or something like this.
0
 
LVL 9

Author Comment

by:crescendo
ID: 11796941
I solved it. I can use Javascript, but my error was to put a space after "Javascript:". The correct URL is:

   Javascript:EditPage({0})

0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 11826582
The question has been PAQ'd and the 250 points have been refunded.
RomMod
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 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