0

hi. I make a project and I have a qouestion. I want to send some data from one windows form to another. The first one is a form, which calculates the discount of a product. The other form has a dataGridView and I want to send the data from DiscountForm to dataGridView cell (for example cell[5]). There is EditButton in DiscountForm and I want to send the data to dataGridView's cell after pushing the button.
Some ideas?
Thanks!

3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by M.Waqas Aslam
0

the editbutton only sand the data to datagridview cell. The form is already open. The form has a datagridview i load data from database. when i load some product(its a software for sales) i want to make a discount of this product, so i made a button in this form, called "Discount". and when i push the "Discount" button, opens a form,which calculates the discount when i enter a data in the textboxes. so there are 3 textboxes and the last is for results (the discount). when i push the "editbutton" i want to send the discount value to cell "discount" in datagridview in the other form

0

you can set the modifire property in property window of your control public from private , then you can access it on your second form like this

frmMain frm = new frmMain();
txtGetText.Text = frm.txtMyText.Text

hope this will help you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.