This is a migrated thread and some comments may be shown as answers.
User may be too fast for Window content loaded via LoadContentFrom...
2 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kai-Tobias
Top achievements
Rank 1
Kai-Tobias asked on 26 May 2011, 05:08 PM
Hi,

I have a problem with (modal) Windows. Their content is loaded via LoadContentFrom and they are initially hidden. There are some of them on one ViewPage and can be made visible by clicking a button. The Windows contain Grids, which are ajax-bound.

If the user clicks the button to open the window (to make it visible) before the GET-request from the LoadContentFrom returns, the modal Window opens without any content (of course), but when after that the GET-request returns, the Window is not populated with the HTML. It stays empty.

Has anybody an idea what I could have missed?
Or is there an event for the time when the LoadContentFrom method is done?

Kind regards,
Kai

2 Answers, 1 is accepted

Sort by
0
nachid
Top achievements
Rank 1
answered on 26 May 2011, 10:42 PM
Put your click hander in a setTimeout  and this will give a chance to your window to finish its LoadContentFrom
0
Alex Gyoshev
Telerik team
answered on 27 May 2011, 11:27 AM
Hello Kai-Tobias,

The only code that gets executed when the request ends is the following:

$('.t-window-content', this.element).html(data);
$t.trigger(this.element, 'refresh');

i.e. the window gets populated with the content and triggers the refresh event. The refresh event, however, does not contain any information about the content that was fetched -- perhaps you can see whether this code fails (or is being executed) - and this may lead you to the problem.

Best wishes,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Kai-Tobias
Top achievements
Rank 1
Answers by
nachid
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or