This is a migrated thread and some comments may be shown as answers.

Need to get values from textbox in Popup window to populate values in specific textbox in detail grid.

1 Answer 695 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thi Han
Top achievements
Rank 1
Thi Han asked on 17 Dec 2010, 12:56 PM
Hi,

I have a radgrid where the columns are programmatically created which are having textboxes in detail grid. Upon clicking, a specific text box, popup window with another text box will appear and the user have to enter values in the text box. Upon closing the popup window, the value entered in the text box from the popup window needs to be populated in the text box which was clicked initially. I'm having trouble getting the value. Is there any way that I could achieve that. (Note: I cannot change the data entry concept because it is the user requirement). Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Dec 2010, 01:27 PM
Hello,


Try the following approach:

1. Attach "OnClientClose" event to RadWindowManager.
2. Attach "onclick" client event to TextBoxes in detail table.
      For this you can loop through the items in detail table in ItemCreated event of grid and use the GridTableView Name to distinguish the items whether they are in MasterTable or in DetailTable.
3. In the "onclick" event handler, save the ClientID of TextBox in a global variable (client side). And add the code for opening window (radopen).
4. When closing in the window, pass the textbox value to main page as argument.
       The document will be helpful: Using RadWindow as a Dialog
5. Now in the OnClientClose handler, get the argument passed (which is textbox text) and set the value of textbox in main page.
       For accessing the textbox, use the global variable which is used to save the ClientID
 
Nearly similar kind of demo, you can find here:
Returning Values from a Dialog


-Shinu.
Tags
Grid
Asked by
Thi Han
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or