Results 1 to 2 of 2

Thread: Editing datagrid problem....have to click edit button twice....HELP!!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2003
    Posts
    31

    Editing datagrid problem....have to click edit button twice....HELP!!

    I have a datagrid on an ASP. NET web application....but for some reason, I have to click the edit button twice before it will actually go into edit mode. Is there something I'm doing wrong..... I've attached the code to this mail.

    Public Sub dgTemp_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgTemp.EditCommand

    dgTemp.EditItemIndex = e.Item.ItemIndex
    Label1.Text = e.Item.ItemIndex
    ' Refresh view
    OnUpdateView(EventArgs.Empty)

    End Sub


    ' *** EVENT: UpdateView
    Public Event UpdateView As EventHandler

    Public Sub OnUpdateView(ByVal e As EventArgs)
    RaiseEvent UpdateView(Me, e)
    End Sub


    Any help with this would be GREATLY appreciated!!!

    Patrick

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2003
    Posts
    31
    Never mind guys....I figured it out....I had to rebind the datagrid

    dgtemp.databind()

    Thanks anyway!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width