How to make GridView entering edit mode by code?

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

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!
 
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
 
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 said:
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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top