ListView EditItem Bug?

Discussion in 'ASP .Net' started by KierenH, Mar 9, 2008.

  1. KierenH

    KierenH Guest

    If you set the EditIndex of a listview to 0, and then try and get the
    EditItem, it is null.

    EditIndex is documented as being zero-based.

    Stepping into the code you can see:

    public virtual ListViewItem get_EditItem()
    {
    if ((this._editIndex > 0) && (this._editIndex < this.Items.Count))
    {
    return this.Items[this._editIndex];
    }
    return null;
    }

    ListView.Items[ 0 ] returns the correct item.

    Using NetFX 3.5.

    Is this a bug? (if so, was unsure where to report it).
     
    KierenH, Mar 9, 2008
    #1
    1. Advertising

  2. KierenH

    KierenH Guest

    bump

    "KierenH" wrote:

    > If you set the EditIndex of a listview to 0, and then try and get the
    > EditItem, it is null.
    >
    > EditIndex is documented as being zero-based.
    >
    > Stepping into the code you can see:
    >
    > public virtual ListViewItem get_EditItem()
    > {
    > if ((this._editIndex > 0) && (this._editIndex < this.Items.Count))
    > {
    > return this.Items[this._editIndex];
    > }
    > return null;
    > }
    >
    > ListView.Items[ 0 ] returns the correct item.
    >
    > Using NetFX 3.5.
    >
    > Is this a bug? (if so, was unsure where to report it).
     
    KierenH, Apr 10, 2008
    #2
    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, Apr 10, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    352
    KierenH
    Apr 10, 2008
  3. KierenH

    ListView EditItem bug

    KierenH, Apr 11, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    2,003
    Steven Cheng [MSFT]
    Apr 11, 2008
  4. .
    Replies:
    0
    Views:
    800
  5. James Cooke
    Replies:
    0
    Views:
    252
    James Cooke
    Sep 11, 2008
Loading...

Share This Page