Bug: Listview edititem: First item in list has a null edititem

J

James Cooke

..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.


--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top