﻿<?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 - Grid state between postbacks</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Grid-state-between-postbacks/</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>Grid state between postbacks</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Grid-state-between-postbacks/</link><pubDate>Mon, 12 Apr 2010 22:16:39 GMT</pubDate><dc:creator>Glayaar</dc:creator><category>WebGrid</category><description>&lt;p&gt;Attached is a simple sample page that I create in order to recreate the issue you are facing.&lt;/p&gt;&lt;p&gt;In my test, after postback the WebGrid will keep it state after postback (sort and filter). The test is using the latest build of WebGrid 7 and WebUI Framework 3, build 403 and build 752 respectively. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Grid state between postbacks</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Grid-state-between-postbacks/</link><pubDate>Mon, 12 Apr 2010 17:33:23 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there a way to make the grid keep its state between postbacks? I mean, sometimes another control (like an asp button) fires a postback for a totally unrelated matter and the grid refreshes on every postback/flypostback.&lt;/p&gt;
&lt;p&gt;On my InitializeDataSource event I have something like this:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;if (!IsPostBack || webGridBeta.IsFlyPostBack)
                e.DataSource = GetDataSet();                &lt;/pre&gt;
&lt;p&gt; So that it'd fetch my data source the first time and on every flypostback (asuming I'm sorting, filtering, etc), but on every other postback the grid fires this event and refreshes with a blank data source. Is it possible to make it behave like a regular gridview? Where on Page_Load you'd some thing like:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;grid1.DataSource = GetDataSet();
                grid1.DataBind();        &lt;/pre&gt;
&lt;p&gt; And it'd keep its state till I rebind it?&lt;/p&gt;
&lt;p /&gt;
&lt;p /&gt;</description></item></channel></rss>