Karen wrote:
> We have a datagrid with a templated column. This column contains a
> textbox. Up until yestday this code (below) worked fine.
>
> str_note =
> CType(DetailsGrid.Items(mintRowsLoop).FindControl( "txtNote"),
> TextBox).Text()
>
> If mintRowsLoop = 0 (first row in datagrid) the above code doesn't
> return the text that was entered.
Karen, FindControl is working, I assure you, otherwise you'd get an
error when trying to reference the Text property.
Are you sure you are not binding the DataGrid on EVERY page load, but
only on the FIST page load? Assuming you are reading the value after,
say, the Update button was clicked, it is common to have the values
"reset" if you are blindly rebinding on each page load. For more info, see:
http://datawebcontrols.com/faqs/Edit...NotSaved.shtml
--
Scott Mitchell
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com
* When you think ASP, think 4GuysFromRolla.com!