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

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. KierenH
    Replies:
    0
    Views:
    366
    KierenH
    Mar 4, 2008
  2. KierenH

    ListView EditItem Bug?

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

    ListView EditItem Bug?

    KierenH, Apr 10, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    352
    KierenH
    Apr 10, 2008
  4. KierenH

    ListView EditItem bug

    KierenH, Apr 11, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    2,004
    Steven Cheng [MSFT]
    Apr 11, 2008
  5. .
    Replies:
    0
    Views:
    800
Loading...

Share This Page