﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Emulating a hyperlink</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Emulating-a-hyperlink/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Emulating a hyperlink</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Emulating-a-hyperlink/</link><pubDate>Tue, 22 Jun 2010 13:53:34 GMT</pubDate><dc:creator>JohnnyBravo</dc:creator><description>&lt;p&gt;I figured it out. The problem was that it was still trying to act like a hyperlink because there was no value being returned from the function. So in the CustomObjectAttributes where you have onclick="javascriptfunction();", I added return false; to it like this onclick="javascriptfunction(); return false;". Returning false, seems to prevent any more from taking place.&lt;/p&gt;</description></item><item><title>Emulating a hyperlink</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Emulating-a-hyperlink/</link><pubDate>Tue, 22 Jun 2010 09:05:15 GMT</pubDate><dc:creator>JohnnyBravo</dc:creator><description>&lt;p&gt;This only partially worked for me. The link is on a grid in a modal dialog. When the link opens, everything is fine (it links to another modal window). When I exit the modal window, a browser window opens up saying IIS 7.5 Detailed Error - 404.0 Not found. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Please help...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>Emulating a hyperlink</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Emulating-a-hyperlink/</link><pubDate>Mon, 21 Jun 2010 21:58:32 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In my test, you could use the InitializeRow server side event handler in order to attach the onclick client side event handler and set the hyperlink to # in order to acachieve the scenario you wanted. You will still need to set the column type as hyperlink. Here is the snippet for InitializeRow server side event handler:&lt;/p&gt;&lt;pre&gt;protected void wgTest_InitializeRow(object sender, RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (e.Row.Type == RowType.Record)&lt;br /&gt;    {&lt;br /&gt;        e.Row.Cells.GetNamedItem("Link").CustomObjectAttributes = "onclick=\"alert('link click');\" href=\"#\" target=\"_self\"";&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Emulating a hyperlink</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Emulating-a-hyperlink/</link><pubDate>Mon, 21 Jun 2010 18:14:39 GMT</pubDate><dc:creator>JohnnyBravo</dc:creator><description>&lt;p&gt;I tried emulating a hyperlink by leaving the column's ColumnType as Hyperlink and attmtempting to capture the click event but the first time I click on it, it fails (it tries to open the link as a hyperlink but I do not have an address). I cannot use a real hyperlink because I am opening the webpage modally and there is javascript code to execute.&lt;/p&gt;
&lt;p&gt;Is there a way I can emulate a hyperlink with the visited link changing color and such?&lt;/p&gt;</description></item></channel></rss>