Passing values from child to parent form

N

naufelbasheer

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
 
J

Jeff Gaines

On 12/03/2007 in message
<[email protected]>
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)

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.
 
G

Guest

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
 
R

RobinS

You could add a property to your parent window, and set it when you close
your child window.

Robin S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top