﻿<?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 - PrepareDataBinding &amp; Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/PrepareDataBinding--Columns/</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>PrepareDataBinding &amp; Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/PrepareDataBinding--Columns/</link><pubDate>Sun, 13 Jun 2010 21:51:21 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Using the provided SaveRestoreLayout.aspx tutorial sample under V3.1 folder, I could save &amp; restore the WebGrid layout and filter the data without any issue you mention. By default the sample does not allow filtering, however you could enable filtering by setting AllowFilter="Yes" under LayoutSettings. Have you tried using the technique in the tutorial sample?&lt;/p&gt;&lt;p&gt;If the method is not applicable, please provide us with a simple running sample so we could analyze the issue further. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>PrepareDataBinding &amp; Columns</title><link>http://www.intersoftsolutions.com/Community/WebGrid/PrepareDataBinding--Columns/</link><pubDate>Fri, 11 Jun 2010 14:16:49 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;Our users are able to save their column preferences so that, if they select some columns on a particular page for removal, these preferences are saved so that when they return, they do not initially see those columns. &lt;/p&gt;
&lt;p&gt;Say, for instance, that I have a grid with three columns (FirstName, LastName, Nickname). A user comes along and selects "Nickname" for removal. This is saved. The user comes back and does a search, the results of which are displayed in a WebGrid. Initially, they do not see Nickname. If they do another search that results in data, they likewise do not see Nickname. So far so good. But the problem that I am experiencing is that if the result set is empty (e.DataSource is set to a DataTable that is "Nothing") and then the user does another search which has results, the "Nickname' column is showing up. So the problem arises in a grid where one search results in a data, a second search results in no data, and a third search results in data.&lt;/p&gt;
&lt;p&gt;The code that manages the columns is contained in "PrepareDataBinding" and the routine that I use to retrieve columns is called on the first search (on a post back) but not on subsequent searches. This typically works fine but not in the case above. Do you have an idea as to what might be causing this issue and what I can do about it? Do I have to call my routine to reload the columns after any empty result set?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item></channel></rss>