﻿<?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 - SaveLayout and template fiels</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-and-template-fiels/</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>SaveLayout and template fiels</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-and-template-fiels/</link><pubDate>Tue, 18 Oct 2016 18:33:15 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;&amp;lt;&amp;lt;&lt;span style="color: rgb(31, 73, 125);"&gt;Regarding the template 
fields, I have reported this to WebGrid development team. The report is 
filed under work item #1080.&amp;gt;&amp;gt;&lt;br&gt;&lt;br&gt;Just
 wondering if anything has been done with work item #1080. I have a 
template field that is in a saved layout and it is not working properly.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;In the WebGrid_InitializeRow event, I am looking for a template field to modify:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Dim cont As WebGridCellTemplateContainer = cells.GetNamedItem("Notes").GetTemplateContainer&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;If
 there is a Template field then I set the image within the template 
based on some data. All is fine if I haven't Saved a Layout. But if I 
save the grids layout and restore (InitializeLayout, PrepareDataBinding 
events ) it, the above line returns Nothing, so the code that sets the 
image never runs. I've looked at the XML that is generated when saving 
and the columnType is set as a template. &lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;This is still a problem in webgrid 10.&amp;nbsp; This was first reported in webGrid 8.&amp;nbsp; Can this get looked into.&amp;nbsp; Not being able to use Template Fields and SaveLayout is a problem.&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;John&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>