How to access the textbox data embedded in a datalist
-
First this app is an intranet WebForms app. I have displayed bond data in a datalist with additional textboxes in the datalist grid for data entry. I'm actually looking for a better solution than the one that is currently implemented. Currnetly: textbox1 is txtQty, textbox2 is txtRate, label1 is lblTotal and button1 is btnCompute. The user enters data in txtQty and txtRate click on btnCompute thus invoke datalist_ItemCommand and retrieve the txtQty & txtRate using the .FindCommand for the current row, then compute the lblTotal and move to the next row. This subroutine gets access to "byval e as System.Web.UI.WebControls.DatalistItemEventArgs" which makes the current row available and life is great, except the dataentry operator has to click the compute button. I would like to get rid of the button and set up the app to use the OnTextChange Event of the textbox. this is a problem because it uses "byval e as System.EventArgs" for its argument and the current datalist row is not available. Can anybody show me how to get the current row of the datalist for the textbox that triggered the OnTextChange event? Thanks, Chuck