Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagrid - How to (just) color the row when click on (any) cell ?

Status
Not open for further replies.

unuktine

Programmer
Sep 15, 2003
9
0
0
RO
hi all

..as I said ... I don't wanna enter the cell but just color the row (when click any cell).
How can I do that ?

10Q
 
I FOUND IT !!!!!!!

private void datagrid_CurrentCellChanged( object sender, System.EventArgs e )
{
datagrid.Select(datagrid.CurrentRowIndex);
}

..and...

private void datagrid_MouseUp( object sender, System.Windows.Forms.MouseEventArgs e )
{
datagrid.Select(datagrid.CurrentRowIndex);
}

C U
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top