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

Floating doc on page refresh

1 Answer 48 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Mark Mrozek
Top achievements
Rank 2
Mark Mrozek asked on 29 Oct 2008, 04:13 PM
Greetings,

I began writing a nice description of my problem when I realized that the same problem exists in the example on your site here - http://demos.telerik.com/ASPNET/Prometheus/Dock/Examples/DynamicDocks/DefaultCS.aspx. To reproduce, simply add a dock or two quickly with the add button, then click the postback button.You need to click the add button before the first page refresh in order to see the issue.

I believe the issue is simply that the javascript doesn't have time to move the new dock from the update panel to the dock zone. Is there a solution? This is something could happen quite easily if the dock takes a second or two to load (i.e. a grid or chart with a lot of data) and the user becomes impatient and clicks again.

Thanks in advance for your input!

1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 29 Oct 2008, 04:34 PM
On my opinion this is normal behavior. The problem is that when you click Postback button - the RadDock is created on the server, but the response from the server is not received yet.

My suggestion is to disable the "postback" button with javascript while the new RadDock is adding, e.g.
1) Press AddDock -> postback button goes disabled
2) When the new dock is docked to the zone -> postback button goes enabled. You can achieve this in the RadDock.OnClientDock event.

Another "general" approach is to handle RadDock.OnClientLoaded event and if the RadDock is not docked to any zone - you should dock it with javascript to some of the available zones.
Tags
Dock
Asked by
Mark Mrozek
Top achievements
Rank 2
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or