Capturing Keypress Event

Topics: Developer Forum, User Forum
Aug 24, 2007 at 5:19 AM
I am using the Real world grid control and would like to capture the keypress event on a boundfield. The application is to allow for rapid entry of test answers - allowing the user to enter a single letter and have the focus moved to the Answer field of the next row. This is my code (less some formatting) - I can't get the 'onkeyup' event to trigger. Anything I can do?

ASP Code:
<rwg:BulkEditGridView ID="grdTest" runat="server" CssClass="gridViewClass" OnRowDataBound="grdTest_RowDataBound" >
<asp:TemplateField HeaderText="Question">
<asp:Label runat="server" CssClass="gridTextControl" ID="Question" Width="100px" Text='<%# ((System.Data.DataRowView)Container.DataItem)"Question".ToString().Trim() %>'></asp:Label>

<asp:BoundField HeaderText="Answer" DataField="Answer" />

protected void grdTest_RowDataBound(object sender, GridViewRowEventArgs e)
e.Row.Attributes.Add("onkeyup", "grdTest.SelectedIndex+=1;");