Capture Enter Key in DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

We have a datagrid in a webform that has item id, template colum with
textbox for quanity and template column with link button to check stock. We
need to capture the enter key when webusers type a quanity in one of the
datagrid textboxes to fire the corresponding "check stock" linkbutton
template column.

Thanks in advance of any help with this.
 
Hi IST,

this can ONLY be done on the client-side. With javascript! But if and how
this event is captureed is dependant on the browser serving on your website.
The latest version of IE blocks that kind of event-capturing.

You can do the following:

<table ... [your datagrid-table] ... onkeyup="captureGridKeyup();">
....
</table>

.... and the javascript function ...

function captureGridKeyup()
{
alert (event.keyCode);
}

regards
patrick
 
Thanks Patrick.

Patrick said:
Hi IST,

this can ONLY be done on the client-side. With javascript! But if and how
this event is captureed is dependant on the browser serving on your website.
The latest version of IE blocks that kind of event-capturing.

You can do the following:

<table ... [your datagrid-table] ... onkeyup="captureGridKeyup();">
...
</table>

... and the javascript function ...

function captureGridKeyup()
{
alert (event.keyCode);
}

regards
patrick

IST said:
Hello,

We have a datagrid in a webform that has item id, template colum with
textbox for quanity and template column with link button to check stock. We
need to capture the enter key when webusers type a quanity in one of the
datagrid textboxes to fire the corresponding "check stock" linkbutton
template column.

Thanks in advance of any help with this.
 

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