Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I used java script to open a new window(child) when user clicks on button from parent window.

On new window(child), I have text box and button, I need to get the value of the text box and pass to parent window gridview when user clicks on button, while closing the child window, I need display my value gridview of the parent window , how can I do that?

1- parent window has button, clicked child window opened
2- child window has text box and button, when button clicked, get the value of the text box and pass to parent window and close child window.
3- and display the child windows text box value to gridview in parent window.

I hope it is clear
Posted
Comments
Mr.TMG 28-Aug-13 20:21pm    
You tagged VB.NET
DhananjayanP 29-Aug-13 1:37am    
Yes
Mr.TMG 28-Aug-13 20:27pm    
Anyway, I've never used java but in vb.net you could create a public event like NewValueEntered and a new class like NewValueEnteredEnevntArgs (Inherits EventArgs). One of the properties in your class set to the new value that was entered. Dim the child form in the parrent form and add handler to that event. When the data is entered into the child form then raise the event and your parent form will run the handling procedure.
Sergey Alexandrovich Kryukov 29-Aug-13 1:43am    
To start with, there is no such thing as "Java script". Java is not a scripting language.
If you mean JavaScript, this is something unrelated to Java.
—SA

1 solution

put this in your button clickevent

me.parent.gridview1.coloumn(0).text=textbox1.text
me.close

---maybe something like that--
 
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