Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fire evnt in Gridview textbox loosing focus

Status
Not open for further replies.

kalkumar

Programmer
Jul 7, 2006
40
US
Hi,

I have a Gridview which contain the 2 columns first column is textbox: ID and second column is the Label for Name. Initially I am loading data into the Gridview from database and the Textbox for ID is in editable mode only. With one save button click I am updating all rows into database.

And one Add button which is outside the Gridview. When the user clicks on the Add I am inserting row to the Gridview. The user enter some value into the textbox ID I need to validate the ID entered If the ID is valid I need to populate the Correspoing name into Name label.

1)Which event I need to fire for Gridview to validate the TextBox entry, Textbox focus lost I need to check the entered ID.

2)If the user changes the ID of the row which Gridview got from Database. Here also I need to validate the Id and populate name for the corresponding ID.

Here my question is which I need to fire for Gridview which need to be fired for the ID text box loosing the focus.



Thanks in advance
 
kalkumar - there have been numberous examples over the last couple of years using Javascript to capture grid values on the client side - since you want to capture this on a "lost focus" event. Take a look at:

thread855-1300079

..see if there might be an insight here. There are other examples listed in a javascript post on FAQs. You can always get a little assistance over at the Javascript forum for more detailed applications.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top