This question is locked. New answers and comments are not allowed.
Hi,
I'm working on getting ajax working with my grid for sorting and paging. I've written java script that makes a requests against one of my controller actions and updates the grid. The problem is when I look at whats happening behind the scene using Firebug I can see that after my java script runs the grid is making a second post to my action.
Here is my java script code.
When I step through the code I get one post back on searchResults.rebind(searchParams).
After the method exits is when I get the second unwanted post back.
Here is my view code
Any ideas?
Thanks,
Mike
I'm working on getting ajax working with my grid for sorting and paging. I've written java script that makes a requests against one of my controller actions and updates the grid. The problem is when I look at whats happening behind the scene using Firebug I can see that after my java script runs the grid is making a second post to my action.
Here is my java script code.
$("#PurchaseGrid th").click(function() { var searchResults = $("#PurchaseGrid").data("tGrid"); var searchParams = { VendorName: $("#VendorName").val() }; searchResults.rebind(searchParams); });When I step through the code I get one post back on searchResults.rebind(searchParams).
After the method exits is when I get the second unwanted post back.
Here is my view code
<% Html.Telerik().Grid<VendorPurchseSearchResult>(Model.SearchResults) .Name("PurchaseGrid") .Columns(c => { c.Bound(column => column.First_Name).Title("First Name"); c.Bound(column => column.Last_Name).Title("Last Name"); }) .Pageable(page => { page.PageSize(20); }) .Sortable() .DataBinding(d => d.Ajax().Select("ajaxSearch", "CustomerVendorPurchase")) .PrefixUrlParameters(false) .Render(); %>Any ideas?
Thanks,
Mike