﻿<?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 loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</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 loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Sun, 13 Dec 2009 20:13:03 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Yes, you are correct. Sorry for my mistake in my previous post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;When I bind WebGrid with LinqDataSource, the “OnSelecting” server side event of LinqDataSource will invoked first and then followed by the “ButtonClick” event of WebButton. When I tried to bind GridView with LinqDataSource, the “ButtonClick” event of WebButton will come first and then followed by the “OnSelecting” server side event. this behavior is the default behavior of WebGrid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;It seems that you would like to bind WebGrid after postback. If it does, then your scenario will be suitable with late binding scenario.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Sun, 06 Dec 2009 23:56:44 GMT</pubDate><dc:creator>GeorgeB</dc:creator><description>&lt;p&gt;Is that true? I don't see this happening with VS controls. If it didthen everytime a page loaded that had a control (e.g. GridView) it
would load. This could cause a serious delay as the GridView is loaded
with maybe millions of useless records.&lt;/p&gt;</description></item><item><title>WebGrid loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Fri, 04 Dec 2009 04:50:48 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;This is default behavior of ASP.NET data source control life cycle.&lt;br /&gt;In .NET life cycle, all data binding process will run first, and then followed by other event, in this case WebButton1_Clicked event.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Wed, 02 Dec 2009 23:37:28 GMT</pubDate><dc:creator>GeorgeB</dc:creator><description>&lt;p&gt;Yudi&lt;/p&gt;&lt;p&gt;I have no problem getting the WebButton click event to work. It's that when the page loads the LinqDataSource_OnSelecting fires. This select is totally useless since the webGrid won't be displayed until the WebButton is clicked and the data retrieved has no meaning to the user.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;i think i have PostInputControls = true but i'll check again.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;George.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebGrid loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Wed, 02 Dec 2009 22:26:15 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I’d like to suggest you to use “&lt;strong&gt;RebindDataSource()&lt;/strong&gt;” method on WebButton click event in order to get the OnSelecting event of LinqDataSource control get invoked after WebButton is clicked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;For the value of the checkbox is not picked up and always false issue, please try to set the “&lt;strong&gt;PostInputControls&lt;/strong&gt;” property of “&lt;strong&gt;FlyPostBackSettings&lt;/strong&gt;” of WebButton to true, as seen below.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebDesktop:WebButton ID="WebButton2" runat="server" Height="20px" PostBackMode="FlyPostBack"
    AutoPostback="true" OnClicked="WebButton1_Clicked"&amp;gt;
    &amp;lt;FlyPostBackSettings PostInputControls="true" /&amp;gt;
&amp;lt;/ISWebDesktop:WebButton&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;This should helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid loads before parameters are set</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-loads-before-parameters-are-set/</link><pubDate>Wed, 02 Dec 2009 21:04:00 GMT</pubDate><dc:creator>GeorgeB</dc:creator><description>&lt;p&gt;I'm using WebGrid with LinqDatasource that uses On_Selecting with a stored procedure. I've noticed that that the On_selecting method is called before the user can set the parameters. &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What i want is the screen to load, the user sets the search parameter fields using WebInputs, WebCombos, checkboxes etc and then clicks a WebButton. If I put a breakpoint at the On_selecting method i can see that it is called before any button is clicked. Also, the value of the checkbox is not picked up. It is always false.&lt;/p&gt;
&lt;p&gt;George&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>