Datagridview column selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Benniit
    New Member
    • May 2008
    • 54

    Datagridview column selection

    Am using vb.net 08 and i have a datagridview with 3 columns. The first column has a button as the columntype with the name "UserName". Now, i want if the user clicks only on the UserName which is the first column, but not the entire row, it should display the value of the UserName column only. If other columns are clicked are apart from the UserName, nothing should display. So there will be a for loop that will itera te through all the rows of the datagridview. So i have something like this
    Dim ctr as Integer
    For ctr = 0 to DataGridView1.R owCount - 1

    'condition here

    Next

    Please, help with the condition. Thanks.
Working...