﻿<?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 problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</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 problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Tue, 27 Sep 2016 15:42:23 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&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;/span&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&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.&amp;nbsp; I've looked at the XML that is generated when saving and the columnType is set as a template.&amp;nbsp; &lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Any idea?&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;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;&lt;br&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Mon, 30 Mar 2015 15:54:18 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>--Regarding the template fields, I have reported this to WebGrid development team. The report is filed under work item #1080.--
I know this is a very old post but anything come out of work item #1080 in saving Template Fields when using SaveTableStructuretoXML?</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Tue, 23 Oct 2012 23:07:17 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Thank you for the feedback regarding the &amp;lt;br /&amp;gt; appearance on the pop-up menu when user use the Select Columns function to show/hide columns.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I’d like to confirm whether this problem persists or not when using the approach that currently used in your project. I assume that we may use different approach to achieve the multiline column header scenario. In my previous post, I use &amp;lt;br /&amp;gt; tag to create the multiple column header. If your technique doesn’t replicate the problem, please feel free to let me know. So that I can help you further by investigating why does the column header become a single line.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Look forward to hearing back from you.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Tue, 23 Oct 2012 06:44:57 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Yudi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;   I have used the &amp;lt;br /&amp;gt; in the column headers but then when you use the Select Columns function to show/hide columns the names in the context menu shows the actual &amp;lt;br /&amp;gt; tag as part of the name.&lt;/p&gt;
&lt;p&gt;I will look at your sample as soon as I can, but I have 2 major releases this month and can not spend much time with this function.  At this point is to buggy to include!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Fri, 19 Oct 2012 02:52:52 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Thank you for the sent screenshot. From the screenshot, I can see that &lt;strong&gt;Grid1.png&lt;/strong&gt; shows multi line in the column header of WebGrid while the &lt;strong&gt;Grid2.png&lt;/strong&gt; file shows a single line column header.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I have modified the sample sent on October 18, 2012 12:21 AM so that the &lt;em&gt;LastName&lt;/em&gt; column header displayed in two lines. In this simple sample, I set the Caption of &lt;em&gt;LastName&lt;/em&gt; column to &lt;em&gt;“Last&amp;lt;br /&amp;gt;Name&lt;/em&gt; in order to make it displayed as multiple line column header.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;The HeaderStyle is placed inside the LayoutSettings object. If it is added inside the RootTable, the HeaderStyle is not saved into xml file when SaveLayoutToXml() method is invoked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I was unable to reproduce the reported problem in my local end. Please have the attached sample tested on your end and let me know if you find anything that I miss during my attempt to reproduce the problematic behavior.&lt;/span&gt;&lt;/p&gt;
</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Thu, 18 Oct 2012 07:00:26 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Here are screenshots that show the problem with the headers styles depending upon the location.&lt;/p&gt;
&lt;p&gt;1. Grid1.png - this screenshot shows the grid header when the &amp;lt;headerStyle.. is located in the &amp;lt;RootTable definition as in...&lt;/p&gt;&lt;pre&gt;&amp;lt;RootTable TableHeaderVisible="False" DataKeyField="CHALLENGE_ID" PreviewRowVisible="True"&amp;gt;
                                &amp;lt;PreviewRowSettings DataMember="DESCRIPTION" DefaultExpanded="false" LoadOnDemand="True" Indentation="0px"&amp;gt;
	                                &amp;lt;Style ForeColor="Black"  &amp;gt;
	                                &amp;lt;/Style&amp;gt;
	                            &amp;lt;/PreviewRowSettings&amp;gt;
                                &amp;lt;HeaderStyle BackColor="#2b5584" BorderColor="#2b5584" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="White" Font-Bold="true" HorizontalAlign="Center" CustomRules="height:auto"&amp;gt;
                                    &amp;lt;BorderSettings&amp;gt;
                                        &amp;lt;Left Color="#2b5584" /&amp;gt;
                                        &amp;lt;Top Color="#2b5584" /&amp;gt;
                                    &amp;lt;/BorderSettings&amp;gt;
                                &amp;lt;/HeaderStyle&amp;gt;&lt;/pre&gt;

&lt;p&gt;2. Grid2.png - shows the header when the &amp;lt;HeaderStyle is located in the &amp;lt;LayoutSettings as in..&lt;/p&gt;&lt;pre&gt;&amp;lt;LayoutSettings AllowFilter="Yes" AllowGrouping="Yes" AllowSorting="Yes" PagingMode="VirtualLoad" VirtualLoadMode="Custom"
                                GroupByBoxVisible="False" AllowColumnFreezing="No" AllowColumnMove="Yes" AllowExport="No" AlwaysShowHelpButton="false"  
                                AllowSelectColumns="Yes" RowLostFocusAction="NeverUpdate" AutoFilterSuggestion="True" FilterBarVisible="false"  
                                HideColumnsWhenGrouped="No" InProgressUIBehavior="ChangeCursorToHourGlass" PagingSize="50"  
                                ShowFilterStatus="True" RestoreRowSelection="RootTableOnly" VirtualPageSize="50" PagingExportMode="ExportAllData" 
                                AllowMultipleSelection="No" GroupRowInfoFormatDefault="[caption] : [value] ([count])" ColumnFooters="Yes" 
                                HeaderClickAction="SortSingle" ShowColumnAction="true" RowHeaders="No" CellClickAction="CellSelect"&amp;gt; 
                                &amp;lt;HeaderStyle BackColor="#2b5584" BorderColor="#2b5584" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="White" Font-Bold="true" HorizontalAlign="Center" CustomRules="height:auto"&amp;gt;
                                    &amp;lt;BorderSettings&amp;gt;
                                        &amp;lt;Left Color="#2b5584" /&amp;gt;
                                        &amp;lt;Top Color="#2b5584" /&amp;gt;
                                    &amp;lt;/BorderSettings&amp;gt;
                                &amp;lt;/HeaderStyle&amp;gt;                                                                                                                                
                            &amp;lt;/LayoutSettings&amp;gt;&lt;/pre&gt;
&lt;p&gt;Look at the column headers for the difference.  As for the other issues I will try to work up a sample.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Thu, 18 Oct 2012 00:21:19 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;blockquote&gt;&lt;p&gt;There is a difference in how the styles are applied based upon their location. When I use the &amp;lt;HeaderStyle under &amp;lt;RootTable, my header text is wrapped on those columns where the width of the column is less than the text.&amp;nbsp; When used in the Layout settings, the header text is not wrapped.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please forgive me for lack of understanding about the reported problem. Could you please show us the problem in a running simple sample or a screenshot?&lt;/span&gt;&lt;/p&gt;&lt;br&gt;&lt;/br&gt;&lt;blockquote&gt;&lt;p&gt;Another problem is when the grid is first loaded and the layout and structure are applied in the WebGrid1_InitializeLayout event if I try to expand a preview row, it reloads the whole grid again via a postback and doesn't expand the preview row, unless I first click on a columns header to sort it, then the preview row will expand.&lt;/p&gt;
&lt;p&gt;And the WebGrid1_InitializeRow event errors out if you try to modify a template field with error saying column doesn't exisit.&lt;/p&gt;
&lt;p&gt;This is an important function for us.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I tried to reproduce the problem in my local test by modifying the SaveLoadWebGridTableStructureAndLayoutToFromXMLFile.aspx sample file (the sample which enclosed as attachment in my previous post on October 16, 2012 12:31 AM). Below is the detail modification made to the sample.&lt;/span&gt;&lt;/p&gt;
&lt;ul style="color: rgb(31, 73, 125);"&gt;&lt;li&gt;Change the data source to Employee table of Northwind dataset.&lt;/li&gt;&lt;li&gt;Enable PreviewRow feature.&lt;/li&gt;
&lt;li&gt;Add OnPrepareDataBinding server-side event to load the table structure of WebGrid.&lt;/li&gt;&lt;li&gt;Add OnInitializeLayout server-side event to load the table layout of WebGrid.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;My efforts were not successful – everything worked smoothly and the preview row can be expanded without any postback or issues.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please have the modified sample evaluated on your end and let me know if there is anything that I miss during my attempt to replicate the problem.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Wed, 17 Oct 2012 07:41:20 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Ok, I see what the problem is...&lt;/p&gt;
&lt;p&gt;In my grid defintion I am using the &amp;lt;headerStyle... under the &amp;lt;RootTable defintion and not in the layout settings, so when I save the layout the header style is not saved.  If I move the &amp;lt;headerStyle to the Layout settings than the header style is saved and restored.  &lt;/p&gt;
&lt;p&gt;BUT &lt;/p&gt;
&lt;p&gt;There is a difference in how the styles are applied based upon their location.  When I use the &amp;lt;HeaderStyle under &amp;lt;RootTable, my header text is wrapped on those columns where the width of the column is less than the text.  When used in the Layout settings, the header text is not wrapped.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Another problem is when the grid is first loaded and the layout and structure are applied in the WebGrid1_InitializeLayout event if I try to expand a preview row, it reloads the whole grid again via a postback and doesn't expand the preview row, unless I first click on a columns header to sort it, then the preview row will expand.&lt;/p&gt;
&lt;p&gt;And the WebGrid1_InitializeRow event errors out if you try to modify a template field with error saying column doesn't exisit.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This is an important function for us.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Tue, 16 Oct 2012 22:12:33 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I re-send the sample files, SaveLoad TableStructure and Layout ToFrom XML File 2.zip. After extract the compressed file you should be able to find four files: &lt;em&gt;SaveLoadWebGridTableStructureAndLayoutToFromXMLFile.aspx; SaveLoadWebGridTableStructureAndLayoutToFromXMLFile.aspx.cs; WebGridTableLayout.xml; and WebGridTableStructure.xml&lt;/em&gt; (SampleFileScreenshot.png).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;The sample is intended to show WebGrid with no style at all when initially loaded in the browser (SampleFileInitiallyLoaded.png). After user press the “Load Structure and Layout” button, the column structure of WebGrid is changed based on the configuration loaded from WebGridTableStructure.xml file; and the HeaderStyle is applied – loaded from WebGridTableLayout.xml file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Tue, 16 Oct 2012 06:52:27 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;Your sample only has the WebGridTableStructure.xml and not the WebGridTableLayout.xml.  I have saved both the layout and structure and when I retsore them, the header styles are NOT restored. &lt;/p&gt;</description></item><item><title>SaveLayout problems</title><link>http://www.intersoftsolutions.com/Community/WebGrid/SaveLayout-problems/</link><pubDate>Wed, 10 Oct 2012 08:15:55 GMT</pubDate><dc:creator>John.Bonin@dot.gov</dc:creator><description>&lt;p&gt;I am trying to Save/Restore a grids layout.  I am using the command: &lt;/p&gt;&lt;pre&gt;WebGrid1.SaveTablesStructureToXml(_file)&lt;/pre&gt;
&lt;p&gt;The structure is saved but when I try to restore the grid's layout the following problems occur:&lt;/p&gt;
&lt;p&gt;1. The header styles that I have set is not restored&lt;/p&gt;
&lt;p&gt;2. Template fields are not included.&lt;/p&gt;
&lt;p&gt;I am restoring the layout in the InitializeLayout event.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'm setting the header style in the RootTable definition:&lt;/p&gt;&lt;pre&gt;                                &amp;lt;HeaderStyle BackColor="#2b5584" BorderColor="#2b5584" BorderStyle="Solid" BorderWidth="1px" Cursor="Hand"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="White" Font-Bold="true" HorizontalAlign="Center" CustomRules="height:auto"&amp;gt;
                                    &amp;lt;BorderSettings&amp;gt;
                                        &amp;lt;Left Color="#2b5584" /&amp;gt;
                                        &amp;lt;Top Color="#2b5584" /&amp;gt;
                                    &amp;lt;/BorderSettings&amp;gt;
                                &amp;lt;/HeaderStyle&amp;gt;&lt;/pre&gt;&lt;pre&gt;How can I make sure that the grid's defintion is used and how to restore templated fields?&lt;/pre&gt;&lt;pre&gt;thanks&lt;/pre&gt;</description></item></channel></rss>