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 / January 2007

Tip: Looking for answers? Try searching our database.

datagridview as part of UserControl - error from designer: object reference not set to....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oli - 30 Jan 2007 17:43 GMT
I have written a simple UserControl that consists of a datagridview
and two buttons that control the scrolling of the grid.

All is fine and dandy - .....nearly ;)

The datagridview that's on the UserControl is actually exposed as a
property: "Grid" - this is a quick and dirty (suitable here) way of
allowing access to the Grid properties.

in the designer the "Grid" property shows up ok - however accessing
the "Columns" property within that gives "object reference not set to
an instance of an object".

If I expose the "Columns" property of the underlying grid via a
"Columns" property the UserControl - then this as expected also shows
up in the designer - but still fails (with a different error message
in this case).

Anyone know if there are any issues I should know about when writing a
UserControl that contain a DataGridView??

thanks,
O.
RobinS - 31 Jan 2007 08:18 GMT
Yes. Search the dotnet newsgroups for "Linda Liu" and "DataGridView". There
was some posting last year about this very problem, and there is no
workaround, *IIRC*.

Robin S.
---------------------------------------------------
>I have written a simple UserControl that consists of a datagridview
> and two buttons that control the scrolling of the grid.
[quoted text clipped - 19 lines]
> thanks,
> O.

Rate this thread:







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.