﻿<?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 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</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 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Fri, 03 Jun 2011 07:09:29 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Yousif,&lt;/p&gt;&lt;p&gt;We are very sorry. It seems, we lost to track this issue due to the long respond time.&lt;br /&gt;But I do still remember the issue. However, would you mind to forward the previous email include the sample? I lost the sample when my computer got crashed.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Thu, 02 Jun 2011 09:42:45 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Handy,&lt;/p&gt;
&lt;p&gt;Has the dynamic grid feature been added to 2011 R1?&lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Wed, 04 Nov 2009 06:09:32 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Ok, we have received your mail and will try to replicate the condition. I will let you know asap.&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Tue, 03 Nov 2009 08:43:28 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I'm not sure I understand what you mean by where.  Our custom grid class does take IsPostBack into consideration along with other aspects, i.e., if it's a fly post back or a custom property and so on.&lt;/p&gt;
&lt;p&gt;I can send you the entire class code, but would like to do that privately since it's proprietary code.  I'll send an email to tech support with this thread referenced.&lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Tue, 03 Nov 2009 00:12:52 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Where did you added a column at your scenario and may i know the validation? It would be great if i could have a simple sample that replicate your issue. I think some condition &lt;b&gt;ISPostBack or !ISPostBack&lt;/b&gt; should be affected the working code your have.&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Tue, 27 Oct 2009 09:47:05 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;I've attached flash videos to see the problem in action.  Hopefully that will make the problem more clear.  The sequence is in grid-column-dynamic:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The grid is refreshed as it is with no issues&lt;/li&gt;&lt;li&gt;I then remove the Value column from our database structure for the grid&lt;/li&gt;&lt;li&gt;I refresh the grid and the rows/column correctly go away on the update but the column header stays&lt;/li&gt;&lt;li&gt;I then put restore the column in our database grid definition&lt;/li&gt;&lt;li&gt;I refresh the grid and the rows are back&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The grid-column-dynamic-page-refresh sequence shows how it behaves when the column is added.  Note in this sequence that it's fine when the page is refreshed.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;all columns there first.&amp;nbsp; I remove the Value column and refresh the page.&amp;nbsp; Works great.&lt;/li&gt;&lt;li&gt;now I add the column back and refresh the grid.&amp;nbsp; When it comes back, it's off to the right and no column header.&lt;/li&gt;&lt;li&gt;I refresh the page which works great&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebGrid 7 - Updating Structure Dynamically Works...Almost</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-7---Updating-Structure-Dynamically-WorksAlmost/</link><pubDate>Fri, 23 Oct 2009 18:00:24 GMT</pubDate><dc:creator>PRISMAY</dc:creator><description>&lt;p&gt;Our custom grid is completely database driven including the formatting.  So we do the custom structure work ourselves.  We also provide transparent "memory" of the grid as users modify it so it stores the grid structure any time a user modifies it, i.e., groups columns, sorts, resizes, removes or adds columns.&lt;/p&gt;
&lt;p&gt;We store the info in XML via the grid's&lt;span style="font-size: 10pt"&gt; SaveTablesStructureToXml into our database and restore it and load it via &lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 10pt"&gt;LoadTablesStructureFromXml.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;When we configure the grid, it's based on the grid definition provided by the database.&amp;nbsp; All the columns are created/updated depending on the grid definition provided.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;The problem is to keep what's saved in sync with a changed definition structure.&amp;nbsp; This won't happen all that often, but when it does, we want to update the grid transparently without the user having to reload the page.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;It's working, mostly, but I'm not sure what I'm missing and am hoping someone can help.&amp;nbsp; The attached CustomGridInitialLoad image shows the grid when initially loaded.&amp;nbsp; I then added a new column to the configuration in the database.&amp;nbsp; The CustomGridAfterRefreshGridData image shows the grid after I click on "Refresh grid data" which shows the column added in the data rows, but it's missing from the column headers.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;If I reload the page (see CustomGridAfterPageRefresh image) everything loads just fine.&amp;nbsp; Essentially what I do in my CompareColumnConfiguration method is to:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;Iterate through our grid definition structure&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;check if a column already exists in the current grid Columns collection&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;if it doesn't, then add it and format it&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;Now iterate through the grid's Columns collection&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;check if the column exists in our grid definition structure&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;if it doesn't, remove it, e.g., this.Columns.Remove(wgc)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size: 10pt"&gt;&lt;span style="font-size: 9px"&gt;&lt;span style="font-size: 13px"&gt;When a column is removed from our definition structure and I refresh the grid via the refresh button or sorting or any action that posts the grid data, then it updates like image CustomGridColDelAfterRefreshGridData which shows the rows for the column are gone, but the header is still there.&amp;nbsp; If I refresh the entire page, it loads fine.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The column still there introduces other problems of course since it'll crash the grid if you try to sort on it or anything related to it since it no longer exists.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>