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

Need some insight, RadWindow and CodeBehind

1 Answer 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
James Legan
Top achievements
Rank 1
James Legan asked on 13 Apr 2009, 03:42 PM
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.

Thanks,

Jim

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 14 Apr 2009, 10:15 AM
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:
http://www.telerik.com/community/code-library/aspnet-ajax/window/server-side-msgbox-user-control-for-radconfirm-radalert-and-radprompt.aspx


Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
James Legan
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or