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

give customised format to the worklink or to the argument

1 Answer 34 Views
Code Templates
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bibhudatta Mangaraj
Top achievements
Rank 1
bibhudatta Mangaraj asked on 19 Jan 2010, 01:36 PM
How to get multiple values of the argument passed from customised dialog box in default.aspx page?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 20 Jan 2010, 02:38 PM
Hi Bibhudatta,

The arguments passed to the main page through RadWindow's close() method are the arguments used by the callback function of the custom dialog. This is an Object type parameter and it can be passed in any valid format. For example, you can pass an array with multiple values to be used for different scenarios in the callback function, e.g.:
/*Code snippet from the function that closes the custom dialog*/
var closeArguments = new Array();
closeArguments[closeArguments.length] = EnableLightBox.checked ? getRadWindow().ClientParameters : getRadWindow().ClientParameters.childNodes[0];
  
getRadWindow().close(closeArguments); //use the close function of the getRadWindow to close the dialog and pass the arguments from the dialog to the callback function on the main page.

/* Callback function used by showExternalDialog() method*/
var myCallbackFunction = function(sender, args) {
    var elemToReplace = elem.parentNode.tagName == "A" ? elem.parentNode : elem;
    elemToReplace.parentNode.replaceChild(args[0], elemToReplace);
      .....
}
Please note the usage of args property inside the callback function - it is a standard array.

Sincerely yours,
Dobromir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Code Templates
Asked by
bibhudatta Mangaraj
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or