How to make GridView entering edit mode by code?

Discussion in 'ASP .Net' started by Michael, Nov 8, 2005.

  1. Michael

    Michael Guest

    Hi,
    I'm learning how to user GridView,
    I add some template fields to the GridView, and put a
    "Edit" LinkButton in Column[0], I have also setup the
    EditItemTempate for each column.

    Now, when the user click the Edit button, how can I
    make GridView entering edit mode? What method should
    I call?

    Thanks!
    Michael, Nov 8, 2005
    #1
    1. Advertising

  2. Michael

    Angelo Cook Guest

    you would need to set the EditIndex of the gridview object to to Row# to be
    edited and re-bind the grid to the datasource. is is why its easier to let
    the managed code do it for you.

    Angelo Cook


    "Michael" <> wrote in message
    news:...
    > Hi,
    > I'm learning how to user GridView,
    > I add some template fields to the GridView, and put a
    > "Edit" LinkButton in Column[0], I have also setup the
    > EditItemTempate for each column.
    >
    > Now, when the user click the Edit button, how can I
    > make GridView entering edit mode? What method should
    > I call?
    >
    > Thanks!
    >
    >
    Angelo Cook, Nov 9, 2005
    #2
    1. Advertising

  3. Michael

    Michael Guest

    What do you mean when you say "let the managed code do it" ?
    I'm writing .NET code, and it is of course managed code, isn't it?

    Would you tell me more detail? Thanks!

    > you would need to set the EditIndex of the gridview object to to Row# to
    > be edited and re-bind the grid to the datasource. is is why its easier to
    > let the managed code do it for you.
    >
    > Angelo Cook
    >
    >
    > "Michael" <> wrote in message
    > news:...
    >> Hi,
    >> I'm learning how to user GridView,
    >> I add some template fields to the GridView, and put a
    >> "Edit" LinkButton in Column[0], I have also setup the
    >> EditItemTempate for each column.
    >>
    >> Now, when the user click the Edit button, how can I
    >> make GridView entering edit mode? What method should
    >> I call?
    >>
    >> Thanks!
    >>
    >>

    >
    >
    Michael, Nov 9, 2005
    #3
    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. LM-Krav
    Replies:
    8
    Views:
    387
    Kenny McCormack
    Dec 2, 2005
  2. =?Utf-8?B?QWRhciBXZXNsZXk=?=

    GridView not entering Line Editing mode when inside FormView

    =?Utf-8?B?QWRhciBXZXNsZXk=?=, May 10, 2007, in forum: ASP .Net
    Replies:
    5
    Views:
    506
    Steven Cheng[MSFT]
    May 28, 2007
  3. Frank Kurka
    Replies:
    8
    Views:
    282
  4. Michael

    GridView disapears after entering edit mode.

    Michael, Mar 21, 2006, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    197
    Ukraine
    Apr 2, 2006
  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:
    370
    Jaime Stuardo
    Apr 7, 2006
Loading...

Share This Page