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

RadDock with AJAX or UpdatePanel

1 Answer 130 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Brian asked on 05 Nov 2008, 10:54 AM

And when you extract into wwwroot and try to access http://yourhost/SmallApp/SmallApp.aspx as a startup page.


Follow to Telerik MyPortal Example, I’ve put RadGrid inside a WebUserControl and

then RadDock will Load this WebUserControl to use further.

And now, here is my questions: (I also ask questions in .cs file to as a comment.)

  1. How to put RadDock inside any kind of UpdatePanel?

Because I need to update RadDock from WebUserControl Event too and

that updated should not affect any other RadDock inside the same RadDockZone.

  1. How to passing parameters (or arguments) from RadDock to WebUserControl

When using LoadControl method?

Because I need to make criteria from outside RadDock and send it to RadGrid

(inside WebUserControl via LoadControl) then rebind.

  1. When I try to create new Docks at the very first time user come into this page

(3 docks in my SmallApp case), The data shows wrong information and it might be

Caused of RegisterJavaScript function that Telerik MyPortal Example gives me

But how to modify for this situations (to create more than 1 docks when hit button once)?

[To test this scenario you have to close and reopen IE again each time to see this problem]

[To see the correct information, try to change to Empty Page and then go back SmallApp.aspx again]

  1. When you hit refresh RadDockCommandButton, I want to update Control inside the dock

(such as rebind the RadGrid). How to do that? (I tried some codes in .cs file but it’s not work.)

  1. Try to remark adding 3 docks in Page_Load Code and then manual click ‘Add Dock’

(like Telerik MyPortal Example), The loading image won’t show.


So, go back to the point again. All I want to ask are:

-          Access WebUserControl from RadDock (such as DockToggleButton Event)

-          Access RadDock from WebUserControl (such as Page_Load Event)

-          RadDock should be updatable by WebUserControl (because RadDock isn’t in any kind of UpdatePanel)

-          How to send parameter to WebUserControl when using LoadControl from RadDock.

-          Create multiple docks at one click button.








1 Answer, 1 is accepted

Sort by
Petio Petkov
Telerik team
answered on 07 Nov 2008, 10:35 AM
Hello Brian,

Please delete our dll's from RapidShare and do not distribute our dll's over the NET. If you want to send us a project,you can send us a support ticket, where you can attach your project.

The RadDock is not a standard control and you can't update only one RadDock. If you want to make an ajax call you should update all RadDockZones and all RadDocks while the RadDocks are docked.
Another solution is to add UpdatePanel into the RadDock and update it via triggers(when a command is clicked) - as we did in MyPortal example.

If You want to modify a control(e.g. a button) which is in userControl you can use the FindControl method, e.g.
RadDock dock = new RadDock();  
        dock.ID = "newRadDock";  
        Control widget = LoadControl("WebUserControl.ascx");  
        widget.ID = "WebUserControl1";  
        //FIRST APPROACH  
        ((Button)widget.FindControl("Button1")).Text = "NEW TEXT";  
        Control newwidget = dock.ContentContainer.FindControl("WebUserControl1");  
        ((Button)newwidget.FindControl("Button1")).Text = "NEW TEXT1"

All you need to do when you want to add more than one RadDock at once, is to modify the script which is registered on the client, e.g.
protected void ButtonAddDock_Click(object sender, EventArgs e)  
            string script = @"function _addDock() {{Sys.Application.remove_load(_addDock);";  
            RadDock latestDock = new RadDock();  
            for (int i = 0; i < 5; i++)  
                RadDock dock = CreateRadDock();  
                script =script + string.Format(@"$find('{1}').dock($find('{0}'));", dock.ClientID, RadDockZone1.ClientID);  
                latestDock = dock;  
            script =script + string.Format(@"$find('{0}').doPostBack('DockPositionChanged');", latestDock.ClientID);  
            script = script + "}};Sys.Application.add_load(_addDock);";  
            ScriptManager.RegisterStartupScript(latestDock, this.GetType(), "AddDock", script, true);  

If you need any further assistance, let us know.

Petio Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question