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 / Languages / Managed C++ / August 2006

Tip: Looking for answers? Try searching our database.

Urgent ! simple question !  using a DataGridView's protected metho

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gon_no1 - 14 Aug 2006 07:02 GMT
Hi there!

I have created a DataGridView in VC++ (in Visual Studio 2005, .NET 2.0), say
its named "myGrid".

I am trying to use its protected method, SetSelectedRowCore, to say
highlight (select) row number 3.

but the compiler says that method can not be accessed.  

I know "SetSelectedRowCore" is a protected method for DataGridView.  How can
use it ?   please help.  Thank you very so much !!!

Cheers !
SvenC - 14 Aug 2006 07:51 GMT
Hi gon_nol,

> Hi there!
>
[quoted text clipped - 6 lines]
>
> but the compiler says that method can not be accessed.

Protected members are only available if you inherit that class. You might
use reflection but than you are ignoring the contract rules of the class.

> I know "SetSelectedRowCore" is a protected method for DataGridView.  How
> can
> use it ?   please help.  Thank you very so much !!!

Use CurrentRow or CurrentCell to select rows or cells.

> Cheers !

Bye,
SvenC

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.