Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi friends
In datagridview cell_click event how can select entire row by selecting a single cell.
By this code we can select row.
datagridviewrow row=datagridview.rows[e.rowindex].
but clicking a cell, i want entire cell of row is selected with selected color
Posted
Updated 16-Feb-13 5:05am
v2

1 solution

Set the SelectionMode property to DataGridViewSelectionMode.FullRowSelect
 
Share this answer
 
Comments
baskaran chellasamy 16-Feb-13 11:29am    
Thanks OrginalGriff. But one thing when first click on the cell, it is not selected,but after a second click on any cell, the row fully selected. what happen
OriginalGriff 16-Feb-13 12:10pm    
It works fine for me.
Are you handling any events?
Maciej Los 16-Feb-13 12:51pm    
My 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900