Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   ASP.Net (http://www.xtremevbtalk.com/asp-net/)
-   -   Understanding GridView Databind (http://www.xtremevbtalk.com/asp-net/326490-understanding-gridview-databind.html)

holtzy 10-09-2013 02:49 PM

Understanding GridView Databind
I am using a gridview inside of an ajax updatepanel. I am not loading data into the datasource on page load. Data is added to the grid using various methods triggered by the user (i.e. the user types in some fields and clicks a button, then a new row is added into the grid). Obviously to show the new row in the grid I must databind each time.

The problem I have run into is that I have a template field inside the grid that is a textbox. I have an event set to fire using the OnTextChanged property

AutoPostBack="true" OnTextChanged="txt_TextChanged"
This event works, but never the first time. In fact, the page never even posts back (i.e. the page load event is never fired).

Do I have to manually add event handlers after each grid databind?

All times are GMT -6. The time now is 09:34 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.