﻿<?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 - access control inside template column type</title><link>http://www.intersoftsolutions.com/Community/WebGrid/access-control-inside-template-column-type/</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>access control inside template column type</title><link>http://www.intersoftsolutions.com/Community/WebGrid/access-control-inside-template-column-type/</link><pubDate>Wed, 02 Jun 2010 02:47:53 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Ca,&lt;/p&gt;&lt;p&gt;You will need to use &lt;b&gt;&lt;i&gt;FindControl &lt;/i&gt;&lt;/b&gt;method.&lt;/p&gt;
&lt;p&gt;e.g I am using a label named as "Label1" in a WebGridColumn.&lt;/p&gt;
&lt;p&gt;Here is how I access the control and set the text:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt; protected void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
 {
        Label a= (Label) e.Row.Cells[4].GetTemplateContainer().FindControl("Label1");
        a.Text = "aaa";
 }&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>access control inside template column type</title><link>http://www.intersoftsolutions.com/Community/WebGrid/access-control-inside-template-column-type/</link><pubDate>Wed, 02 Jun 2010 01:26:31 GMT</pubDate><dc:creator>ismail</dc:creator><description>hi,&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;sorry for the mis understanding made on the question.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;i know it is not possible to use &lt;span style="font-size: 9pt;"&gt;HyperLinkFormatString property to asp button control.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt;"&gt;by the above line of code i mean,  i want to access the property of asp.net control used inside the template column type.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size: 9pt;" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Caption="View Details" ColumnType="Template" DataMember="L_ID"&lt;br /&gt;        Name="WebGridColumn11" Width="110px"&amp;gt;&lt;br /&gt;        &amp;lt;CellTemplate&amp;gt;&lt;br /&gt;                      &amp;lt;asp:ImageButton ID="btndet" CssClass="example7" runat="server"      Text="View Details" ImageUrl="~/Images/vdetails.png" /&amp;gt;&lt;br /&gt;                      &lt;br /&gt;        &amp;lt;/CellTemplate&amp;gt;&lt;br /&gt;     &lt;br /&gt;&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt;"&gt;Here how can i assign CssClass property from the backend exactly as i did it for &lt;/span&gt;HyperlinkFormatString property of hyperlink control.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>access control inside template column type</title><link>http://www.intersoftsolutions.com/Community/WebGrid/access-control-inside-template-column-type/</link><pubDate>Tue, 01 Jun 2010 13:47:37 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Ca,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; As far as I know, we cannot use HyperLinkFormatString property to set the asp link button control. You can simply set the NavigateUrl in your template instead of set them in the serverside.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; The HyperLinkFormatString can only be used when the column type is set to Hypelink. I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>access control inside template column type</title><link>http://www.intersoftsolutions.com/Community/WebGrid/access-control-inside-template-column-type/</link><pubDate>Tue, 01 Jun 2010 06:26:15 GMT</pubDate><dc:creator>ismail</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;i am using "Template" columnType inside my Webgrid. If i use asp:LinkButton inside a Template,  can you tell me how can access that control from the backend. Here i want to initialize the field as what i did with Hyperlink column type as shown below&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;WebGrid1.RootTable.Columns(1).HyperlinkFormatString = "displaymap.aspx?id=" &amp;#43; "{0}"&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;thanks and regards&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;ca&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>