Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Modify a row and then filter, exception: Index 1 does not have a value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    110

    Resolved [RESOLVED] [2005] Modify a row and then filter, exception: Index 1 does not have a value

    My datagridview is binded to a binding source.

    Then I change a value of a cell in column (c) in the first row, and click other rows.

    Then I set the filter of the binding source by the other other than the very cell I modified.

    The above exception occurs in my RowLeave function.
    And this error occurs accidentally.

    How I can fix it?
    Last edited by sunhpj; Jul 23rd, 2008 at 06:40 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [RESOLVED] [2005] Modify a row and then filter, exception: Index 1 does not have a value

    This is marked resolved with no posted resolution.

    If you have found an answer to your question, please post what you did. It could help others with the same or similiar question.

    Thanks.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    110

    Re: [RESOLVED] [2005] Modify a row and then filter, exception: Index 1 does not have a value

    Hi, thanks .

    Actually it is just a bug issue, so I mark it resolved after I fix the bug.

    After chosing a filter, just one row left, so bindingsource just has 1 row.
    But I click the last row( new row), so the index is out of range.

    I fix it by adding a judgment of index < bindingsource.count

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width