CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Steve Hebert's Development Blog

Steve's Blog - From .Net to dotMath and everything in between.

WebGrid.Net and working with OnTheFlyPostback

This post relates to using the Intersoft WebGrid.Net grid object.  This web-based grid is extremely flexible, but currently requires Internet Explorer to run.  Intersoft is in the process of rolling out their products to support the Gecko engine.  I'm blogging this ability because it was not immediately apparent in the product documentation.

The WebGrid.Net tool supports what they term "OnTheFlyPostback".  When you are working within the grid, things like edits, sorts and incremental row gets are handled by posting only the necessary information for the task at hand.  While the functionality is very cool, it circumvents some behaviors you expect on a PostBack.  Namely, if I have a seperate filter textbox control on the webpage and a postback occurs within the grid, the textbox control is always empty. Why? Because the textbox information was not posted back to the server.

When you want send extra information back to the server in the case of a postback (such as the contents of a TextBox control), you can register the information using the AddInput(name, value) function.  This is a client-side script function that can be run at any time.  Any postback will send this information to the browser when a light-weight postback function occurs - and at the server you can access the values with Request.Form(key). 

I've built a functions around the script and server-side code to automate this process on web user controls and it works quite nicely.

 



Comments

Stephen Hebert said:

No I don't.
# March 15, 2005 5:48 AM

Ryan said:

WebGrid.NET with ontheflypostback technology is one of the amazing invention on ASP.NET ever until now.
# March 16, 2005 9:18 PM
Check out Devlicio.us!

Our Sponsors