1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

C# Passing data between forms

Discussion in 'C#' started by gambit_1607, Feb 9, 2010.

  1. gambit_1607

    gambit_1607 New Member

    hello. i have problem with c# multiple form app. in my first form i have a combo box, a list, a text box and an add item button. in the combo box i have a list of products. once i choose a product from combo box and enter the quantity in the text box, it will show up on my list. but if i click on an empty string from combo box such as "" and click on add item, it will take me to a subform where i can put in the specifications of the product. in the second form i have the product name and other specifications. i also have an update button when the name of the product in the second form's text box is entered and update button is clicked, it should upload the name of the product to the first form's combo box.





    ...continued below
     
  2. gambit_1607

    gambit_1607 New Member

    usually when u want to pass data u have the driver class, there u create an object of the first form and once in the first form, u create an object of the second form and pass the first form's values into the second form. but in this case its different. you are creating an object of the first form in the driver class. then once the user is in the first form and clicks add item for a blank string in the combo box, an object of the second form is created. once product name is entered into the second form and the update button is clicked the data has to be passed back to the first form. so it is back and forth.

    here is my code

    please follow this link nexusfactor.webs.com/Lab.rar

    THANK YOU A LOT IN ADVANCE!
     

Share This Page