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

[Solved] Update Target for Server-Side Binding w/Paging?

1 Answer 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Antony
Top achievements
Rank 1
Antony asked on 23 Feb 2012, 12:20 PM
Hi there,

I'm currently trying to use a grid in the following scenario: I have a grid which is configured for server side binding in a partial view. I have a controller action which returns this partial view and the grid is configured to bind to this action. Everything works however when I try to page through the grid the anchors for the paging change the URL of the entire page, is there a way to have these automatically just replace the grid in a more ajax-like fashion whilst still being able to use server-side binding?

I have managed to work around the problem with some simple jQuery (below), I was just curious if this is possible "natively" or if it's a feature that could possibly be added in the future?

Thanks!

--jQuery Code--

$("a.t-link").add("a.t-refresh").click(function (event) {
        event.preventDefault();
 
        var href = $(this).attr("href");
 
        $.get(href, function (data) {
            $("#MyGrid").replaceWith(data);
        });
    });

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Feb 2012, 08:24 AM
Hi,

 If you need only the grid to update you must configure it to use ajax binding. Server binding performs HTTP get requests and refreshes the whole page.

All the best,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
Antony
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or