DataGrid Update

  • Thread starter Thread starter John Hoge
  • Start date Start date
J

John Hoge

Is there an easy way to make sure that the Update button event handler
will be fired if the user presses enter in a textbox in a row that is
being edited?
 
you can add this code in EditItemCommand of the data grid.
Page.RegisterHiddenField("__EVENTTARGET",UpdateButtonID);

but this has flaw..it will call update button click when you press enter in
any text on the page. should be fine if you text boxes only in the row that
you are editing.
otherwise check this code
http://weblogs.asp.net/rajbk/archive/2003/12/11/43023.aspx

Av
 
That brings up another question: how to get the ID of the button
generated by an Edit/Update/Confirm column in a Datagrid?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top