﻿<?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 - How to create template Cell programmatically?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-create-template-Cell-programmatically/</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>How to create template Cell programmatically?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-create-template-Cell-programmatically/</link><pubDate>Mon, 30 Nov 2009 02:05:25 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi Michal,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; To make a template column programmatically, first, you will need a class file that Instantiate the type of column that you wanted and add it to the container. After that,at prepare databinding on server side, you will need to add a new column and call that specific class.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here are the sample code that I make to create a template column with label in it. Remember to put the class CellTemplate.cs file into your App_Code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
</description></item><item><title>How to create template Cell programmatically?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-create-template-Cell-programmatically/</link><pubDate>Thu, 26 Nov 2009 09:03:40 GMT</pubDate><dc:creator>mpodbielski</dc:creator><category>WebGrid</category><description>&lt;p&gt;I've found in sample  definintion CellTemplate cell:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;pre&gt; &amp;lt;ISWebGrid:WebGridColumn Name="CommandColumn1" Caption=" " Bound="False" Width="150px"
                    ColumnType="Template"&amp;gt;
                    &amp;lt;CellTemplate&amp;gt;
                        &amp;lt;asp:Button ID="B1" runat="server" Text="View Orders" Height="18px" Font-Size="8pt"
                            OnClick="B1_Click" /&amp;gt;
                    &amp;lt;/CellTemplate&amp;gt;
                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;But i don't know how to create programtically that kind of CellTemplate, I've tried with class that implements ITemplate interface but it doesn't work fine the template shows only in the last rows and disapper after postback . Can You give me simple sample how to create this column with CellTemplate from sample? &lt;/p&gt;</description></item></channel></rss>