2

Can you please show me a sample code of loading image during data binding using telerik grid asp.net mvc Razor.

Thanks in advance.

1 Answer 1

4

Check out the client events for OnDataBinding and OnDataBound. I would show a loading spinner when the OnDataBinding starts, then hide it again when the next method is called.

<%= Html.Telerik().Grid(Model)
    .Name("Grid")
    .ClientEvents(events => events.OnDataBinding("Grid_onDataBinding")
                                  .OnDataBound("Grid_onDataBound")) %>

And then, the javascript would be:

function Grid_onDataBinding(e) {
    $("#spinner").show();
}

function Grid_onDataBound(e) {
    $("#spinner").hide();
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.