Hi all,

Before I used updatepanel the code below is worked.

asp Code:
  1. Protected Sub grdStatusMaster_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles grdStatusMaster.RowEditing
  2.  
  3.         With grdStatusMaster
  4.  
  5.             .EditIndex = e.NewEditIndex
  6.             .ShowFooter = False
  7.             .Width = 560
  8.             .Columns.Item(4).ItemStyle.Width = 125
  9.  
  10.             If Me.IsPostBack Then
  11.  
  12.                 Me.grdStatusMaster.DataSource = (CType(Session("myDatatable"), DataTable)).DefaultView
  13.                 Me.grdStatusMaster.DataBind()
  14.                 Dim descTB As TextBox
  15.                 Dim rowCheckbox As CheckBox
  16.                 Dim strScript As String
  17.                 descTB = .Rows(.EditIndex).Cells(2).FindControl("txtdesc")
  18.                 rowCheckbox = .Rows(.EditIndex).Cells(0).FindControl("ChkSelect")
  19.  
  20.                 strScript = "<script language=""JavaScript"">" & vbCrLf & _
  21.                              vbTab & "document.getElementById('" & descTB.ClientID & "')" & ".focus();" & _
  22.                               vbCrLf & vbTab & "document.getElementById('" & descTB.ClientID & "')" & ".select();" & _
  23.                               vbCrLf & vbTab & "document.getElementById('" & rowCheckbox.ClientID & "')" & ".checked = true;" & _
  24.                              vbCrLf & "<" & "/script>"
  25.                 Page.ClientScript.RegisterStartupScript(GetType(String), "HighLightText", strScript)
  26.  
  27.             End If
  28.         End With
  29.  
  30.     End Sub

But after I used updatepanel the code above doesn't worked.

Can any one tell me why it happened and how to solve my issue ?

Thanks a lot.