Click here to Skip to main content
15,903,201 members
Home / Discussions / C#
   

C#

 
QuestionGeneric Control WinForms and Toolbox/Designer Pin
DaveyM6919-Feb-09 10:54
professionalDaveyM6919-Feb-09 10:54 
AnswerRe: Generic Control WinForms and Toolbox/Designer Pin
Luc Pattyn19-Feb-09 11:34
sitebuilderLuc Pattyn19-Feb-09 11:34 
GeneralRe: Generic Control WinForms and Toolbox/Designer Pin
DaveyM6919-Feb-09 11:44
professionalDaveyM6919-Feb-09 11:44 
AnswerRe: Generic Control WinForms and Toolbox/Designer Pin
Luc Pattyn19-Feb-09 11:56
sitebuilderLuc Pattyn19-Feb-09 11:56 
QuestionI need help whit my programme Pin
ZRF6919-Feb-09 10:43
ZRF6919-Feb-09 10:43 
AnswerRe: I need help whit my programme Pin
Deresen19-Feb-09 11:36
Deresen19-Feb-09 11:36 
AnswerRe: I need help whit my programme Pin
Mycroft Holmes19-Feb-09 13:49
professionalMycroft Holmes19-Feb-09 13:49 
AnswerRe: I need help whit my programme Pin
DaveyM6919-Feb-09 14:23
professionalDaveyM6919-Feb-09 14:23 
OK - this is the last time. I had a quick look and I think I see what you want.

To attempt translation... you have several TextBoxes on a MdiChild Form. On a ButtonClick on that Form you want to send the contents of all the TextBoxes to a different MdiChild Form so you can populate a DataGridView. Is that correct?

If so, the first step is to get the data from the textboxes into a useable format in the Button's Click event handler. I would recommend a class instance with properties to hold each piece of data, but a string array or List<string> would do.
Next, you need to create a custom event like I showed you before. Raise that event like I showed you, also in the Button's Click event handler.
Next, in the MdiParent, after you have instanciated but before it's shown, subscribe to your custom event (the handling method should be created automatically for you).
You will also need a field to hold the reference to the form with the DataGridView.
In the form with the DataGridView, create a method or property that takes data in whatever format you decided in the first step and updates the DataGridView.
In the MdiParent's custom event handler method, call the other form's method/property (assuming it's not null) passing the received data.

Colin Mackay has a great article[^] - look at the section called Sibling to Sibling.

Now you have the principle, go ahead and try it, and post back with any specific problem.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

QuestionPlease help me with this simple C question Pin
meixiang619-Feb-09 10:00
meixiang619-Feb-09 10:00 
AnswerRe: Please help me with this simple C question Pin
Luc Pattyn19-Feb-09 10:35
sitebuilderLuc Pattyn19-Feb-09 10:35 
Questionproblem whit WS Pin
E_Gold19-Feb-09 9:59
E_Gold19-Feb-09 9:59 
AnswerRe: problem whit WS Pin
Dave Kreskowiak19-Feb-09 11:50
mveDave Kreskowiak19-Feb-09 11:50 
GeneralRe: problem whit WS Pin
E_Gold19-Feb-09 19:53
E_Gold19-Feb-09 19:53 
GeneralRe: problem whit WS Pin
Dave Kreskowiak20-Feb-09 1:47
mveDave Kreskowiak20-Feb-09 1:47 
QuestionAuto Synch with Website Pin
Richard Andrew x6419-Feb-09 9:55
professionalRichard Andrew x6419-Feb-09 9:55 
AnswerRe: Auto Synch with Website Pin
Dave Kreskowiak24-Feb-09 12:46
mveDave Kreskowiak24-Feb-09 12:46 
QuestionAdditionaly any device to add the system will not boot. In using c#..... Pin
Member 423560119-Feb-09 9:37
Member 423560119-Feb-09 9:37 
AnswerRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Dave Kreskowiak19-Feb-09 11:49
mveDave Kreskowiak19-Feb-09 11:49 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Member 423560123-Feb-09 7:05
Member 423560123-Feb-09 7:05 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Dave Kreskowiak23-Feb-09 12:02
mveDave Kreskowiak23-Feb-09 12:02 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Member 423560124-Feb-09 10:51
Member 423560124-Feb-09 10:51 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Dave Kreskowiak24-Feb-09 12:43
mveDave Kreskowiak24-Feb-09 12:43 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Member 423560125-Feb-09 8:12
Member 423560125-Feb-09 8:12 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Dave Kreskowiak25-Feb-09 12:17
mveDave Kreskowiak25-Feb-09 12:17 
GeneralRe: Additionaly any device to add the system will not boot. In using c#..... Pin
Member 423560126-Feb-09 10:21
Member 423560126-Feb-09 10:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.