Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert and edit in formview
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Divers
Thread ID:
01094501
Message ID:
01094863
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hi
>
>I'm using VS 2005 witn VB
>I have a gridview with a list of records. I use a hyperlink to access another page. That page have a formview for editing selected record.
>Id from selected record is passed to the page with formview, so the sqldatasource is filtered.
>The page with formview is in insert mode.
>I want to add a link in the page with gridview to insert new records.
>How can I call the page with formview page that I use for edit and set insert mode?
>How can I call the page with gridview after updating or cancelling the edit or insert?
>
>TIA
>
>-----------------------------------------------------------------------------------------
>
>Hola a todos
>
>Estoy utilizando VS 2005 con VB
>Tengo un gridview en el que muestro una lista de registros. Utilizo un
>hiperlink para accedar a otra pagina que tiene un formview para editar el
>registro seleccionado.
>El identificador del registro seleccionado en el gridview se lo paso a la
>pagina que tiene el formview para que por medio de un parametro filtre el
>sqldatasource al registro seleccionado.
>Puse la pagina con el formview en modo edicion por defecto.
>Quiero agregar un link en la pagina que tiene el gridview para permitir la
>insercion de un registro.
>¿Como hago para llamar a la pagina que tiene el formview que uso para editar
>y que entre directamente en modo insertar?
>¿Como hago para que al utilizar el boton de actualizar luego de salvar la
>edicion o el agregado vuelva a la pagina que tiene el gridview directamente?
>
>Desde ya muchas gracias


Rodrigo,
After saving the record you could use Response.Redirect to take you to the grid page. On the dg I use something like this:
<asp:TemplateColumn HeaderText="" ItemStyle-VerticalAlign=Middle>
<ItemTemplate>
   <span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial, Sans-Serif;"><form action="customerview.aspx" method="post" id="cust<%# DataBinder.Eval(Container.DataItem, "ID")%>"><input type="hidden" name="fCustomerID" id="fCustomerID" value="<%# DataBinder.Eval(Container.DataItem, "ID")%>"><a href="javascript: document.getElementById('cust<%# DataBinder.Eval(Container.DataItem, "ID")%>').submit();">view</a></form></span>
</ItemTemplate>
</asp:TemplateColumn>
Ricardo A. Parodi
eSolar, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform