If dgv1.Rows.Count > 0 Then dgv1.Rows(0).FindControl(1).Focus()
TextBox按下Enter後將焦點指向某個BUTTONtxtQuery.Attributes.Add("onkeydown", "if(event.keyCode == 13) document.getElementById('" + btnQuery.ClientID + "').focus()")
If Not IsPostBack Then
物件轉型
Dim l As Label = DirectCast(sender, Label)
Dim txtrowcount As TextBox = CType(e.Row.FindControl("txtrowcount"), TextBox)
If (e.Row.RowState And DataControlRowState.Edit) > 0 Then e.Row.Focus()
If e.Row.Cells(1).Controls.Count > 0 Then e.Row.Cells(2).Controls(0).Focus()
Dim col As TemplateField
col = New TemplateField
col.ItemTemplate = New MyGdvTemplate(DataControlRowType.DataRow, "cuNUMB")
col.HeaderTemplate = New MyGdvTemplate(DataControlRowType.Header, "編號")
dgv1.Columns.Add(col)
沒有留言:
張貼留言