Greetings,
First some background information:
I have a RadTextBox which accepts an employee id (if known). If the employee id is not known, there is a hyperlink button accompanying the RadTextBox, which opens up a search dialog in a RadWindow. In the RadWindow, the user can enter search criteria to filter a list of employees, which appear in a RadGrid. The leading field in the RadGrid contains a hyperlink that, when clicked, should do the following:
1. Close the RadWindow.
2. Set the value of the RadTextBox in the parent window.
3. Cause a postback in the parent window.
I’ve got most of it working, but have several questions.
1. Is it possible to set (via Javascript) the value of the RadTextBox in the parent window such that a postback would automatically occur (the RadTextBox specifies AutoPostBack=”true”)?
2. What is the correct way to set the input values associated to a RadTextBox? I was trying to use a generic solution that would work for other similar search dialogs; so I pass the Id of the RadTextBox through as a querystring parameter in the NavigateUrl attribute of the RadWindow. The following Javascript function is called when the RadWindow is closed (OnClientClosed attribute):
function onClientCloseLOV(oWnd, args) {
var arg = args.get_argument();
if (arg) {
$get(arg.id).value = arg.value;
}
}
Note: “arg.id” is the RadTextBox ID attribute in the parent window. The problem here is; if I subsequently click on the input field the value disappears!