Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

DataGrid select row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Lei - 09 Sep 2004 21:34 GMT
Hi,

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

Thanks.
david
Dmitriy Lapshin [C# / .NET MVP] - 13 Sep 2004 10:36 GMT
Hi David,

Check out the DataGrid section of the WinForms FAQ on
http://www.syncfusion.com. It has an exact answer to your question.

Signature

Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

> Hi,
>
[quoted text clipped - 3 lines]
> Thanks.
> david
Sanjeeva - 13 Sep 2004 22:53 GMT
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 :    Sanjeeva@proteans.com
Phone:    91-80-36880796
Office:    91-80-51217844
Fax    :     91-80-51217536
MSN  :   sanjeeva_2k4@hotmail.com
YahooIM :   jack_hide2000

> Hi,
>
[quoted text clipped - 3 lines]
> Thanks.
> david

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.