This is a migrated thread and some comments may be shown as answers.
Ajax call from any telerik control is not making a call to the ajaxSetup.complete function. However, it does make a call to beforeSend
0 Answers 26 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.
Amit
Top achievements
Rank 1
Amit asked on 31 Dec 2010, 03:59 AM
Considering that the telerik MVC controls are making a call to the server through jquery AJAX and so on.. but  ajax call from any telerik control is not making a call to the ajaxSetup.complete function. However, it does make a call to beforeSend

This is the code that I have in my master site file.
 jQuery.ajaxSetup({
            beforeSend: function () {
                $('#loader-busy-block').show()
            },
            complete: function () {
               
                $('#loader-busy-block').hide()
            },
            success: function () { }
        });
Now when the telerik MVC drop down is being used, the load busy block is showing but it is not hiding.

for e.g.

<td>
 <%: Html.Telerik().DropDownListFor(model => model.SelectedUser).HtmlAttributes(new { style = "width:380px" })
                                                     
                                                    .DataBinding(binding => binding.Ajax().Select("AjaxUserList",
                                                    "Users", new { selectLogonUser = true }))
                                            %></td>

One solution is to do the following:
 .ClientEvents(e => e.OnDataBound("Post_DataBound")

and then
function Post_DataBound(e) {
            $('#loader-busy-block').hide();

I can work with this work around but If I've 10 controls this is not the right solution. Please help me!!!

Please tell me the solution?

Tags
General Discussions
Asked by
Amit
Top achievements
Rank 1
Share this question
or