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: Sun, 5 Aug 2007 16:04:49 -0400,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Bill Gower
          2    Siva M


GridView and Edit of current row   
I have a GridView with an edit button.  When the user clicks 'Edit', I want 
to display the information in a form and allow the user to edit the 
information.  I have a RowCommand event in which I take the data from the 
row and update form controls.  How do I know in the RowCommand what the 
current row is?  I tried GridView.Rows[EditIndex] but I get a -1 when I do 
that.

ex.

DateOccured.Text = 
TimeSheetGridView.Rows[TimeSheetGridView.EditIndex].Cells(4).Text;

Bill
Date:Sun, 5 Aug 2007 16:04:49 -0400   Author:  

RE: GridView and Edit of current row   
Hi,

See if this helps: 
http://www.c-sharpcorner.com/Blogs/BlogDetail.aspx?BlogId=231

"Bill Gower" wrote:


> I have a GridView with an edit button.  When the user clicks 'Edit', I want 
> to display the information in a form and allow the user to edit the 
> information.  I have a RowCommand event in which I take the data from the 
> row and update form controls.  How do I know in the RowCommand what the 
> current row is?  I tried GridView.Rows[EditIndex] but I get a -1 when I do 
> that.
> 
> ex.
> 
> DateOccured.Text = 
> TimeSheetGridView.Rows[TimeSheetGridView.EditIndex].Cells(4).Text;
> 
> Bill
> 
> 
> 
Date:Sun, 5 Aug 2007 21:36:00 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


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