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 Data Binding / December 2007

Tip: Looking for answers? Try searching our database.

Databinding problem on inherited form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lynn - 12 Dec 2007 21:02 GMT
In VS2005, I have a base form that is designed to be inherited by many other
forms in an application.  This base form contains various controls bound to a
dataset (ds1).  The dataset is set to Protected so the base control can have
access to it.  I created an inherited form (call it Form2) from the base form
and added controls to Form2.  The controls on Form2 are also bound to ds1.  I
tried to add the binding for the controls in the code and also setting up the
binding in the designer.  Either way, when I run the application, the binding
of the controls on Form2 does not work.  I debugged the code and I can see
the binding being added.  However when I try to save the datarow, changes
made to the datarow are not detected.  The datarow is unchanged.  This was
working in Visual Studio 2003.  I am only seeing this problem after we've
converted our project over to VS2005.  Any ideas on how to resolve this?  
Thanks.

Lynn
Morten Wennevik [C# MVP] - 17 Dec 2007 07:46 GMT
Hi Lynn,

This should work fine in VS 2005 as well.  Are you seeing values in the
inherited form?  If no values are shown I'd suspect a type somewhere.  If
values are shown, do they reflect changes in the inherited form if you change
row?  

Try trapping the RowChanging/RowChanged events on the datatable to see if
they fire.  

Signature

Happy Coding!
Morten Wennevik [C# MVP]

> In VS2005, I have a base form that is designed to be inherited by many other
> forms in an application.  This base form contains various controls bound to a
[quoted text clipped - 11 lines]
>
> Lynn

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.