﻿<?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 - Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</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>Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</link><pubDate>Thu, 30 Jun 2011 00:04:54 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Neil,&lt;/p&gt;&lt;p&gt;Thank you for your patience. &lt;br /&gt;To use an icon/image which have hyperlink in cell of WebGrid, first of all you have to set the column type to "HyperLink". Then input the codes that defines where hyperlink will be navigate and change the display text into icon/image tag in &lt;b&gt;InitializeRow &lt;/b&gt;WebGrid event. For example, see snippet codes bellow :&lt;/p&gt;
&lt;p&gt;For this example, the image would be existed on the second column.&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;For WebGridColumn (on clienSide):&amp;nbsp;&lt;br /&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Caption="CategoryName" DataMember="CategoryName" Name="CategoryName" Width="100px" &lt;b&gt;ColumnType="HyperLink"&lt;/b&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;On ServerSide:&lt;br /&gt;&lt;pre style="background-color: rgb(255, 252, 225); font-family: 'courier new', tahoma; font-size: 9pt; "&gt; protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
    {
        // To change a cell type into image.
        // Note that e.Row.Cells[0].Text is ColumnID.
        // Note that e.Row.Cells[1].Text is name of the image.
        WebGrid1.RootTable.Columns[1].HyperlinkDisplayText = " &amp;lt;img alt='" &amp;#43; "?id=" &amp;#43; e.R        ow.Cells[0].Text &amp;#43; "' src='" &amp;#43; e.Row.Cells[1].Text &amp;#43; "'/&amp;gt;";
        
        //To set a hyperlink format string. You can chage e.Row.Cells[0].Text into appoin        tmentID based on your scenario.
        WebGrid1.RootTable.Columns[1].HyperlinkFormatString = "http://www.google.co.id/s         earch?" &amp;#43; e.Row.Cells[0].Text;
    }
&lt;/pre&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Hope this helps.&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;</description></item><item><title>Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</link><pubDate>Wed, 29 Jun 2011 09:44:14 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><description>&lt;p&gt;Any news on this yet?&lt;/p&gt;</description></item><item><title>Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</link><pubDate>Mon, 27 Jun 2011 12:48:36 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><description>&lt;p&gt;I don't have another scenario as this layout was stipulated by the client&lt;/p&gt;</description></item><item><title>Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</link><pubDate>Mon, 27 Jun 2011 06:23:48 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Neil,&lt;/p&gt;&lt;p&gt;I'm currently still investigating your problem and need more time to provide a solution for you. For my added information, are you have another scenario beside using image hyperlink in WebGrid ?&lt;/p&gt;
&lt;p&gt;I will let you know soon for an update.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for your patience.&lt;br /&gt;Riendy&lt;/p&gt;</description></item><item><title>Webgrid How can I have a hyperlink- in a cel with an icon</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Webgrid-How-can-I-have-a-hyperlink--in-a-cel-with-an-icon/</link><pubDate>Sat, 25 Jun 2011 07:19:02 GMT</pubDate><dc:creator>neil.turner@ntd.co.uk</dc:creator><description>&lt;p&gt;What I want to do is have an icon in a cell which denotes the value of the datamember of the cell (pending/active/cancelled) and for that icon to have a hyperlink on it based on the DataKeyValue of the row (appointmentid)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;How can I acheive that?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.ntd.co.uk/images/statusbutton.jpg" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; " alt="" /&gt; &lt;/p&gt;</description></item></channel></rss>