View Single Post
Old 10-09-2013, 02:49 PM
holtzy holtzy is offline
Senior Contributor
Join Date: Jul 2002
Location: USA
Posts: 1,054
Talking 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?
God is good!!!
Reply With Quote