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

Discussion in 'ASP .Net Web Controls' started by James Cooke, Sep 11, 2008.

  1. James Cooke

    James Cooke Guest

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


    --
     
    James Cooke, Sep 11, 2008
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?WGF2aWVybw==?=
    Replies:
    0
    Views:
    492
    =?Utf-8?B?WGF2aWVybw==?=
    Aug 2, 2004
  2. Replies:
    5
    Views:
    30,430
    Mike Schilling
    Mar 29, 2006
  3. KierenH
    Replies:
    0
    Views:
    452
    KierenH
    Mar 4, 2008
  4. KierenH

    ListView EditItem Bug?

    KierenH, Mar 9, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    476
    KierenH
    Apr 10, 2008
  5. KierenH

    ListView EditItem Bug?

    KierenH, Apr 10, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    KierenH
    Apr 10, 2008
  6. KierenH

    ListView EditItem bug

    KierenH, Apr 11, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    2,271
    Steven Cheng [MSFT]
    Apr 11, 2008
  7. .
    Replies:
    0
    Views:
    1,081
  8. Don Vaillancourt

    First "undefined" then null and now "null"

    Don Vaillancourt, Oct 27, 2004, in forum: Javascript
    Replies:
    13
    Views:
    424
    Thomas 'PointedEars' Lahn
    Dec 11, 2004
Loading...