cell click problem using data grid view

Discussion in 'C#' started by morfix78, Apr 29, 2008.

  1. morfix78

    morfix78 New Member

    Joined:
    Sep 16, 2007
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    hi,
    I am using a generic list in a class and I connect this list to a binding source which is connected to a data grid view using the DataSource and DataMember properties of the data grid view. when i add the first object to the list a new row is added to the data grid view. when i click the first row I get an exception: "index -1 does not have a value". if I add another row and click the second row in the data grid view I do not receive any exception.
    can someone tell why i receive this error?
    thank.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice