Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 11 Sep 2008 14:25:41 -0500,    group: microsoft.public.dotnet.framework.aspnet.webcontrols        back       


Bug: Listview edititem: First item in list has a null edititem   
.NET version 3.5
Visual studio 9.0.21022
Using C#

It appears as if the listview index is 1 based and not zero based.

Steps to reproduce:

Create a listview and allow it to be updated
Add the method to trap the click event of the UPDATE button on the edititem template
<asp:Button CommandName="Update" ID="UpdateButton" OnClick="UpdateButton_Click" runat="server" Text="Update"/>

protected void UpdateButton_Click ( object sender , EventArgs e )
{
   //ListView1.EditItem at this point will be NULL. But not if you clciked on annt subsequent ones.
}



Run the app, and edit the first row
then click the UPDATE button, and your debugger will stop at the above mentioned event handler
ListView1.EditItem is null.


-- 
--
James Cooke
jamesBYTEMESPAMMERScooke_tx@yahoo.com

--
date: Thu, 11 Sep 2008 14:25:41 -0500   author:   James Cooke

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us