Set focus on Edit TextBox when I LoadGrid()

fullyii

Member
Joined
Aug 19, 2005
Messages
22
Location
Chicago
Programming Experience
1-3
I want the screen to open up with the focus set on the edit textbox. If there are a lot of rows in the datagrid it resets back to the top each time. Can anyone help?



<CODE>
<asp:DataGrid ID="dgKnow" runat="server"

OnEditCommand="EditRecord"
OnCancelCommand="CancelEdit"
OnUpdateCommand="Updaterecord" ........

<columns>
<asp:BoundColumn DataField="LOGIN_ID" HeaderText="NBKID" />

</columns>
</asp:DataGrid>


Public Sub EditRecord(ByVal Sender As object, ByVal E As DataGridCommandEventArgs)

dgKnow.EditItemIndex = E.Item.ItemIndex
LoadGrid()

End Sub

</Code>
 
Last edited by a moderator:
Back
Top