Home All Groups Group Topic Archive Search About

Go directly to edit mode in formview?

Author
8 Feb 2006 7:27 PM
Eric W. Holzapfel
Hello WebControl group,

Is there a way I can go direct from clicking the "details" link in a
gridview (which, in my case opens/displays a formview) to have my
formview open direct to the edit mode, bypassing the itemtemplate?

I have a gridview, and use the "details" link button which can open the
Itemtemplate in my formview compenent.  I would like to skip the
itemtemplate and go direct to editing (update, cancel, delete).

I am using Visual Studio 2005, and SQL 2005.

Thanks,

eric

Author
8 Feb 2006 7:40 PM
Phillip Williams
Hello Eric,

Yes, the FormView has a method named ChangeMode that allows you to switch
the view to the specified data-entry mode, e.g.
FormView1.ChangeMode (FormViewMode.Edit)

http://msdn2.microsoft.com/ehe673ff(en-US,VS.80).aspx
Show quoteHide quote
"Eric W. Holzapfel" wrote:

> Hello WebControl group,
>
> Is there a way I can go direct from clicking the "details" link in a
> gridview (which, in my case opens/displays a formview) to have my
> formview open direct to the edit mode, bypassing the itemtemplate?
>
> I have a gridview, and use the "details" link button which can open the
> Itemtemplate in my formview compenent.  I would like to skip the
> itemtemplate and go direct to editing (update, cancel, delete).
>
> I am using Visual Studio 2005, and SQL 2005.
>
> Thanks,
>
> eric
>