hae guys...
i have two datagrid in two separate forms...i want to use one datagrid to search for a product in my database and use this value to make sales in a different datagrid in a different form....i have tried using a friend datatype but its not working....Anyone with an idea how i can do it???
1 Replies - 92 Views - Last Post: 30 January 2013 - 07:57 AM
#1
how to access a datagrid row value in another datagrid
Posted 30 January 2013 - 07:34 AM
Replies To: how to access a datagrid row value in another datagrid
#2
Re: how to access a datagrid row value in another datagrid
Posted 30 January 2013 - 07:57 AM
From my FAQ list
[*]Q: ...get Form/class 'A' to make a change or talk to Form/class 'B'
NOTE: Don't try to access GUI controls across forms. Its wrong. Nobody will hire you if you do this sort of crap. It violates every guideline for 'black box' programming, Separation of Responsibility, loose binding of components, and event driven programming. Read the tutorials and learn to do it right the first time so you don't develop bad habits that you just have to un-learn later.
A:
[*]Q: ...get Form/class 'A' to make a change or talk to Form/class 'B'
NOTE: Don't try to access GUI controls across forms. Its wrong. Nobody will hire you if you do this sort of crap. It violates every guideline for 'black box' programming, Separation of Responsibility, loose binding of components, and event driven programming. Read the tutorials and learn to do it right the first time so you don't develop bad habits that you just have to un-learn later.
A:
- See this thread for the simplest of example code between two forms.
The tutorials below actually teach and explain it further. - Passing values between forms/classes
- Bulding an application - Part 1
- Building an application - Part 2
- Quick and easy custom events
- Delegates, Lambdas and Events
- http://www.codeproje...g-Windows-Forms
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|