Passing information from dataGrid to Form2 and back.

May 13 2004 9:41 AM
I have a question about communicating between forms and such . The JPEG images that I attached will give you a hopefully better description of my problem. http://www.imagestation.com/picture/sraid116/pc40d1d4e62c7143eb134a53cd7841df1/f8af1f73.jpg (designview.jpg) designview.jpg will show you the design view of the program I am creating. There are 3 tables on an SQL server (calls; problem; customers) Calls table contains: callid (key non repeating int) customerid typeid datebegin useropen priorityflag problemdesc commentdesc closeflag solutiondesc userclose dateend usercomplete problem table contains: typeid (key non repeating int) probtype customer table contains: customerid (key non repeating int) namelast namefirst dsn altdsn commercial ftp usataid location customerid are related and typeid are related http://www.imagestation.com/picture/sraid116/p778e1b0c154df920813b3e07721d31aa/f8af1f67.jpg (mainwindow.jpg) mainwindow.jpg is the program running. You can see the dataview collection in the grid and the layout of the fields. First you select the call you want to update / view http://www.imagestation.com/picture/sraid116/p9b888f9803b111359d6e27185efc16cc/f8af1f6f.jpg (rowselected.jpg) rowselected.jpg is the result of button_click on the grid. Now, I want to update the problem. I do not want to edit the existing problem text, but rather add another text entry to the problem window. So, I hit problem update and http://www.imagestation.com/picture/sraid116/p5568487932996ac57ce9bc0dc4d8c47d/f8af1f6c.jpg (updatewindow.jpg) updatewindow.jpg shows you the results. Now, here is my problem. I want to type into this window "something goes here" and have it add itself (when I hit the update button) to the selected row and the correct column that contains the 'problem' cell. Basically Select Row; update problem: new window; type in new window; save text into the selected row. The second problem (kinda like the first): http://www.imagestation.com/picture/sraid116/pf078cf8435520fc9e0f34dd0c53c2d9e/f8af1f79.jpg (contacts.jpg) I have a contacts list. Once again populated with a DataSet Now, I know how to grab the information from the set and put it on the same window (see mainwindow.jpg) thats the easy part. But I want to pass the information of a selected row into a new window for edit/updating http://www.imagestation.com/picture/sraid116/p726295d8b6343126d3e183b8ab19c264/f8af1f77.jpg (updatecontacts.jpg) When I hit the update window on the contacts page, the updatecontacts.jpg window appears. Now what ever row I have selected, I want that information to populate these fields. Then after I edit these fields, the information be passed back into the contacts table and the dataset updated. I am still new to programming. So any help would be appreciated.

Answers (1)