Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table which has GoodsID and GoodsName. in my form i have a texbox. when i enter the GoodID it will show the GoodsName. but imagine if we don't know our GoodsID. so i made a search button. when i click on this button it will show a new form so that i can search GoodsID by typing GoodsName. now the question is when i find my intention GoodsID how can i show this GoodsID by clicking on the cell.
any help will be appreciated.
thanks in advance
Posted

If you have a link to the new form from the old just update first form when you close the old form. Else you can pass the selected value with the mediator pattern.

see following for explanation of the mediator pattern.
http://en.wikipedia.org/wiki/Mediator_pattern[^]
 
Share this answer
 
If you are referring to the DataGridView to show GoodsId when a Cell of DataGridview is clicked then CellClick event of DataGridView expalined here
DataGridView.CellClick Event[^]
can be used for this purpose.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900