Need some insight, RadWindow and CodeBehind

2 posts, 0 answers
  1. James Legan
    James Legan avatar
    54 posts
    Member since:
    Sep 2008

    Posted 13 Apr 2009 Link to this post

    I have the need to do some RadWindow creation programatically. I understand the generation of the actual dialog through the use of 

    RegisterStartupScript() and I have used this method in the past, but what I am trying to do with the results of the dialog are a little different and I hit a road block.

    Here is the scenario:

    RadCombobox and RadGrid on the page.

    User makes a selection in the combobox which populates the grid.
    Based on the selection of the griditem, the codebhind looks at the combobox to see if there are any other similar items in the combobox.

    At this point, if the combobox contains similar items, I want to prompt the user and ask if the same selection should be applied to those as well. This will be a confirm dialog.

    What I am running into an issue of is how to handle the confirm dialog. If the user clicks yes, how do I make a call into codebehind to update my objects (custom class) and update the combobox and grid controls respectively. All of the examples I can find are for clientside programming and nothing that would allow me to take the results of a RadConfirm dialog and make use of the return value in codebehind. All of this of course is being managed by RadAjaxManager to add another layer of complexity.

    For example, the radcombobox has an icon associated with each item that is updated based on whether or not that particular item has a grid selection associated with it. So, if the user chooses to apply that grid selection to the similiar items, I would need to update the controls visibly.



  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 14 Apr 2009 Link to this post

    Hello James,

    Just as the standard browser's confirm, radconfirm is created and handled on the client only.  Please also note that once you receive the argument from the radconfirm dialog on the client(it is returned in the CallbackFunction), it must be sent to the server after that.
    This (sending arguments from the client to the server with JavaScript) is a general programming task - for example you can use __doPostBack() or RadAjax's ajaxRequest call to do this.

    You may also find the following Code Library article helpful - it was submitted by a customer of ours:

    Sincerely yours,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top