﻿<?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 - Set others control visibility on Grid's InitializePostback?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Set-control-visibility-on-InitializePostback/</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>Set others control visibility on Grid's InitializePostback?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Set-control-visibility-on-InitializePostback/</link><pubDate>Tue, 20 Apr 2010 17:01:06 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;As far I know, when you set Visible=false at page load, you could not change it directly into true in FlyPostBack. Visible state properties only can be used fully if the page do FullPostback because Visible properties contains some informations of the control state besides rendering process. &lt;br /&gt;I suggested you to hide the button by setting display style into none. &lt;br /&gt;When FlyPostBack request, add display="" in the style.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;protected void WebGrid1_InitializePostBack(object sender, ISNet.WebUI.WebGrid.PostbackEventArgs e)
{
        Button1.Style.Add("display", "");
        WebGrid1.ClientAction.RenderControl(Button1);
}&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Set others control visibility on Grid's InitializePostback?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/Set-control-visibility-on-InitializePostback/</link><pubDate>Tue, 20 Apr 2010 14:24:48 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looking over the samples, the RenderControl method looks like the appropiate choice for this. I need to reset some controls visibility after the grid refreshes/sorts. I have a button that's initially invisible and want to turn it visible during the InitializePostback event when the action matches sort/refresh.&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&amp;lt;asp:Button id="btnInc" runat="server" Text="Increment Vessel" OnClick="btnInc_Click" Visible="false" /&amp;gt;&lt;/pre&gt;
&lt;p&gt; And my handler declaration...&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;protected void InitializePostback(object sender, PostbackEventArgs e)
        {
                btnInc.Text = "Dummy";
                btnInc.Visible = true;
                wgTest.ClientAction.RenderControl(btnInc);    
        }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;This is not working as is... what am I missing?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p /&gt;</description></item></channel></rss>