DataGrid select row

D

David Lei

Hi,

How do I programmatically select a full row by clicking on it?
DataGrid only select a cell by default..

Thanks.
david
 
S

Sanjeeva

Write an event handler for Paint event get the current position and select
the current row.

private void dataGrid1_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)

{

x = ((CurrencyManager)dataGrid1.BindingContext[ dataSet11,
"User" ]).Position;

dataGrid1.Select( x );

}

--
Regards,
Sanjeevakumar Hiremath
__________________________
e-mail : (e-mail address removed)
Phone: 91-80-36880796
Office: 91-80-51217844
Fax : 91-80-51217536
MSN : (e-mail address removed)
YahooIM : jack_hide2000
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top