DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 10 Aug 2007 10:45:36 -0400,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Mike
          2    Siva M
          3    lee whitbeck


keep selected row in grid view   
On my web form I have a gridview and I allow the user to edit a row but clicking a button above the grid. The Edit button takes them to a edit page with the details of the selected row. When they click 'save' on the Edit page it takes them back to the page. 


How can I have the row they selected to edited remain selected when they come back from the edit page?
Date:Fri, 10 Aug 2007 10:45:36 -0400   Author:  

RE: keep selected row in grid view   
Did you try setting GridView.SelectedIndex property after save?

"Mike" wrote:


> On my web form I have a gridview and I allow the user to edit a row but clicking a button above the grid. The Edit button takes them to a edit page with the details of the selected row. When they click 'save' on the Edit page it takes them back to the page. 
> 
> 
> How can I have the row they selected to edited remain selected when they come back from the edit page?
> 
> 
> 
> 
Date:Fri, 10 Aug 2007 09:22:00 -0700   Author:  

Re: keep selected row in grid view   
On Aug 10, 11:22 am, Siva M  wrote:

> Did you try setting GridView.SelectedIndex property after save?
>
> "Mike" wrote:
> > On my web form I have a gridview and I allow the user to edit a row but clicking a button above the grid. The Edit button takes them to a edit page with the details of the selected row. When they click 'save' on the Edit page it takes them back to the page.
>
> > How can I have the row they selected to edited remain selected when they come back from the edit page?


You will have to store the selected index, so that when they click
save, and go back to the page you can reset the Index Value. You can
use a session like below.

GridView1.SelectedIndex = (Int32)Session["SelectedGridIndex"];
Date:Fri, 10 Aug 2007 16:44:28 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us