﻿<?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 - HyperlinkFormatString</title><link>http://www.intersoftsolutions.com/Community/WebGrid/HyperlinkFormatString/</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>HyperlinkFormatString</title><link>http://www.intersoftsolutions.com/Community/WebGrid/HyperlinkFormatString/</link><pubDate>Mon, 14 Sep 2009 22:29:15 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;In order to retrieve the hyperlink using Javascript you will need to access the hyperlink cell element and use the href property.&lt;/p&gt;&lt;p&gt;Here is a snippet to retrieve the hyperlink during onclick event of the hyperlink cell. The snippet will show you how to use the passed value and WebGrid selected object to accomplish this goal and bind the onclick event during initializerow server side event.&lt;br /&gt; &lt;/p&gt;&lt;pre&gt;protected void grdObj_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (e.Row.Type == ISNet.WebUI.WebGrid.RowType.Record)&lt;br /&gt;    {&lt;br /&gt;        string hypFormatString = "test.aspx?val=" &amp;#43; e.Row.Cells.GetNamedItem("value").Text;&lt;br /&gt;        e.Row.Cells.GetNamedItem("url").Column.HyperlinkFormatString = hypFormatString;&lt;br /&gt;        e.Row.Cells.GetNamedItem("url").Column.HyperlinkTarget = HyperlinkTarget.Blank;&lt;br /&gt;&lt;br /&gt;        string customObjectAttributes =&lt;br /&gt;            " onclick = \"DoClick(this)\"";&lt;br /&gt;&lt;br /&gt;        e.Row.Cells.GetNamedItem("url").CustomObjectAttributes = customObjectAttributes;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;function DoClick(val) {&lt;br /&gt;    var grid = ISGetObject("grdObj");&lt;br /&gt;    var selectedCell = grid.GetSelectedObject().GetRowObject().GetCell('url');&lt;br /&gt;    var href = selectedCell.CellElement.getElementsByTagName('a')[0].href;&lt;br /&gt;    &lt;br /&gt;    alert(val.href &amp;#43; " \r\n" &amp;#43; href);&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>HyperlinkFormatString</title><link>http://www.intersoftsolutions.com/Community/WebGrid/HyperlinkFormatString/</link><pubDate>Mon, 14 Sep 2009 06:18:35 GMT</pubDate><dc:creator>ismail</dc:creator><description>&lt;p&gt;thank you for the reply.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;how can i get the  &lt;span style="font-family: 'courier new'; font-size: 12px; color: rgb(63, 63, 63); line-height: 18px; white-space: pre-wrap; "&gt;HyperlinkFormatString of the selected link in the javascript.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;Means i am running the javascript function when click on the hyperlink. Inside that i want to get the HyperlinkFormatString.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;thanks and regards &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;ca &lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; color: rgb(63, 63, 63); font-family: 'courier new'; "&gt;&lt;span style="font-size: 12px; line-height: 18px; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>HyperlinkFormatString</title><link>http://www.intersoftsolutions.com/Community/WebGrid/HyperlinkFormatString/</link><pubDate>Sun, 13 Sep 2009 23:44:36 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;You could retireve or set the HyperlinkFormatString from the Column property of the WeGrid. Here is a snippet in order to retrieve the HyperlinkFormatString from OrderID column:&lt;/p&gt;&lt;pre&gt;grdObj.RootTable.Columns.GetNamedItem("OrderID").HyperlinkFormatString&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>HyperlinkFormatString</title><link>http://www.intersoftsolutions.com/Community/WebGrid/HyperlinkFormatString/</link><pubDate>Sun, 13 Sep 2009 01:58:54 GMT</pubDate><dc:creator>ismail</dc:creator><description>&lt;p&gt;how can i get the HyperlinkFormatString from the backend in C#.&lt;/p&gt;</description></item></channel></rss>