This question is locked. New answers and comments are not allowed.
Hello! I wonder how I can make a call to a method "Post" (the Controller) using ServerBinding (in Grid component). I can not use AJAX in this case.
I prefer to use Post method for the parameters be not visible in the URL.
| .DataBinding(databinding => databinding.Server().Select("MyAction", "MyController", new { param1 = "value1", param2 = "value2" })) |
3 Answers, 1 is accepted
0
IQworks
Top achievements
Rank 1
answered on 14 Apr 2010, 01:28 AM
Hi Kira,
Please excuse me, I didnt understand this sentence...
"I prefer to use Post method for the parameters be not visible in the URL".
But here is a link on server binding
http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-server-binding.html
and another example as well
Please excuse me, I didnt understand this sentence...
"I prefer to use Post method for the parameters be not visible in the URL".
But here is a link on server binding
http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-server-binding.html
and another example as well
| <% Html.Telerik() |
| .Grid(Model) |
| .Name("customers") |
| .PrefixUrlParameters(false) |
| .Columns(columns => |
| { |
| columns.Add(c => |
| { |
| %> |
| <%= Html.ActionLink("Edit", "Edit", new { id = c.CustomerID })%> |
| <%= Html.ActionLink("Delete", "Delete", new { id = c.CustomerID })%> |
| <% |
| }).Title("Action"); |
| columns.Add(c => c.CompanyName).Width(200); |
| columns.Add(c => c.ContactName); |
| columns.Add(c => c.Address); |
| columns.Add(c => c.City); |
| columns.Add(c => c.PostalCode); |
| columns.Add(c => c.Country); |
| columns.Add(c => c.Phone); |
| columns.Add(c => c.Fax); |
| }) |
| .Filterable() |
| .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn)) |
| .Pageable() |
| .Scrollable(scrolling => scrolling.Height(250)) |
| .Render(); %> |
0
Kira
Top achievements
Rank 1
answered on 14 Apr 2010, 12:44 PM
The URL I mentioned looks like this:
"http://demos.telerik.com/aspnet-mvc/Grid?ajax=False&theme=vista&Grid-page=2&Grid-orderBy=ContactName-asc"
Well, anyway I saw the link and this line is my question:
"By default the Telerik Grid for ASP.NET MVC will perform server side requests (HTTP GET) when doing paging, sorting and filtering. This is called "Server binding".
Instead of performing an HTTP GET, it is possible to perform an HTTP Post?
Thank you very much for the response! =)
0
Accepted
Hi Kira,
No, it is not possible to use HTTP POST with server binding. You can use Ajax binding instead - it is doing HTTP POST behind the curtain.
Regards,
Atanas Korchev
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.
No, it is not possible to use HTTP POST with server binding. You can use Ajax binding instead - it is doing HTTP POST behind the curtain.
Regards,
Atanas Korchev
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.