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

Tip: Looking for answers? Try searching our database.

Passing values from child to parent form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
naufelbasheer@gmail.com - 12 Mar 2007 10:09 GMT
Dear All,
I have struck up with some probs, I m using c#.net (VS2005)
I have a form for employee details which is having 65 fields, from
there i'm calling a child window with a data grid  which will display
only  emp_name , id  designation , my requirement is I need to fill
all fields in  the parent form by clicking one value from the data
grid  (in child form) .

(this im using for edit/delete purpose)

Please help me
Thanks
Nau
Jeff Gaines - 12 Mar 2007 11:15 GMT
On 12/03/2007 in message
<1173690548.517937.325850@c51g2000cwc.googlegroups.com>

>Dear All,
>I have struck up with some probs, I m using c#.net (VS2005)
[quoted text clipped - 5 lines]
>
>(this im using for edit/delete purpose)

Does each record have a unique identifier, e.g. a record number?
If so you can set up a public field in the child form, set it to the
record number when OK is clicked (or -1 for no record/cancel) and then
access that from your main form when the child form is closed.

Signature

Jeff Gaines

Ciaran O''Donnell - 12 Mar 2007 11:17 GMT
This is were businses objects prove valuable in application development. In
my aqpplication I would have an Employee businiess object which would be what
was selected in the grid. This I could expose the selectedEmployee as a
property of the child form and return it to the parent form as a single value.

Try looking at something like CSLA.NET which is a business object framework
developed by Rocky Lhotka. http://www.lhotka.net/

HTH

Signature

Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com

> Dear All,
> I have struck up with some probs, I m using c#.net (VS2005)
[quoted text clipped - 9 lines]
> Thanks
> Nau
RobinS - 13 Mar 2007 06:27 GMT
You could add a property to your parent window, and set it when you close
your child window.

Robin S.
------------------
> Dear All,
> I have struck up with some probs, I m using c#.net (VS2005)
[quoted text clipped - 9 lines]
> Thanks
> Nau

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.