GridView Directly Accessing the Edit of FormView

Discussion in 'ASP .Net' started by mosscliffe, May 22, 2006.

  1. mosscliffe

    mosscliffe Guest

    Is it possible to get a GridView 'Select' to go straight to the 'Edit'
    of a Formview.

    If I add a 'New' button to the GridView can I get that to go straight
    to the Insert of a FormView.

    Is it possible to trap the event of 'Update' Button Pressed in
    FormView. When I select the linkButton in Formview

    Thanks for any help / pointers.

    Tim
    mosscliffe, May 22, 2006
    #1
    1. Advertising

  2. mosscliffe

    mosscliffe Guest

    The answer appears to be changing the default Mode of the FormView to
    Edit or Insert.

    I still can not work out how to trap the Gridview / FormView
    LinkButtons

    I created the following code by copying the code generated by having a
    link button on a page, but not within a formview.

    'Protected Sub UpdateButton_Click(ByVal sender As Object, ByVal e
    As System.EventArgs) Handles UpdateButton.Click
    ' Response.Write("Update Link Button Clicked" + "<BR>")
    'End Sub
    'Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e
    As System.EventArgs) Handles InsertButton.Click
    ' Response.Write("Insert Link Button Clicked" + "<BR>")
    'End Sub

    But I get a compiler Error

    Error 1 Handles clause requires a WithEvents variable defined in the
    containing type or one of its base types.

    This is getting to serious hair removal time.
    mosscliffe, May 22, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,325
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  2. =?Utf-8?B?RGFiYmxlcg==?=

    specify row to edit when opening formview from gridview?

    =?Utf-8?B?RGFiYmxlcg==?=, Mar 22, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,583
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Mar 23, 2006
  3. Mike P2

    Http module to directly edit output

    Mike P2, May 23, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    325
    John Timney \(MVP\)
    May 24, 2007
  4. Don
    Replies:
    1
    Views:
    4,705
    Lanoli
    Sep 26, 2008
  5. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    391
    Jaime Stuardo
    Apr 7, 2006
Loading...

Share This Page