﻿<?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 celltemplate vanishes when paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/</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 celltemplate vanishes when paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/</link><pubDate>Fri, 22 Jan 2010 01:50:48 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Guillermo,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Yes it is. Glad to hear that it solves your problem. Please do not hesitate to ask if you have any other questions. Thank you.&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>WebGrid celltemplate vanishes when paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/</link><pubDate>Thu, 21 Jan 2010 10:37:09 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Thanks Andi, effectively I have to create the column onInitializeLayout and don't check for the postback to make it persist while paging.&lt;/p&gt;</description></item><item><title>WebGrid celltemplate vanishes when paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/</link><pubDate>Thu, 21 Jan 2010 01:23:37 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p /&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Hi Guillermo,&lt;/span&gt;&lt;span style="font-size: 9pt; "&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;     Yes, if we use Classic Paging in the WebGrid,
 we cannot create the new cellTemplate in PrepareDataBinding since the
WebGrid's life cycle only ignites the function once in the beginning. To have
 the label appears in the next page of classic paging, we need to set it
on InitializeLayout. You can remove the code in PrepareDataBinding and put these following code on your InitializeLayOut. So that, the layout will be re-initialize after we go to
the next page. Here is the snippet:&lt;/span&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;font class="Apple-style-span" style="font-size: 15px; font-family: 'lucida sans unicode', sans-serif; "&gt;&lt;span style="font-size: 12px; " /&gt;&lt;/font&gt;&lt;/p&gt;&lt;font class="Apple-style-span" style="font-size: 15px; font-family: 'lucida sans unicode', sans-serif; "&gt;&lt;pre&gt;if (WebGrid1.RootTable.Columns.GetNamedItem("test") == null)
        {
            WebGridColumn newColumn = new ISNet.WebUI.WebGrid.WebGridColumn();
            newColumn.ColumnType = ISNet.WebUI.WebGrid.ColumnType.Template;
            newColumn.CellTemplate = new cellTemplate();
            newColumn.Name = "test";
            newColumn.Width = 300;
            newColumn.Caption = "Templated Column";
            WebGrid1.RootTable.Columns.Add(newColumn);
        }
        else
        {
            WebGrid1.RootTable.Columns.GetNamedItem("test").CellTemplate = new cellTemplate();
        }   
            &lt;/pre&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="font-size: 9pt; "&gt; I hope it solves your problem and please, do not hesitate to ask if you have any other questions. Thank you.&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;&lt;/font&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebGrid celltemplate vanishes when paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/</link><pubDate>Wed, 20 Jan 2010 17:01:04 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is related to adding programmatically a CellTemplate to webgrid. A solution was given for a similar question on this &lt;a href="http://www.intersoftpt.com/Community/WebGrid/How-to-create-template-Cell-programmatically/" target="_blank"&gt;thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, I need to support both templates and paging, and as soon as I enable paging and go to some other page (than the first one, and even later, when returning to the first page) the content from the celltemplate is gone. &lt;/p&gt;
&lt;p&gt;I tried this by adding the solution given on the zip for that thread to the WebGridSamples project that comes with the suite.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>