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

[Solved] Ajax Binding Question

0 Answers 73 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.
bogus
Top achievements
Rank 1
bogus asked on 09 Oct 2010, 09:47 PM
I am looking at the example and i have one question
<%= Html.Telerik().Grid<Order>()
       
.DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding", "Grid"))
       
.Name("Grid")
       
.Columns(columns =>
       
{
            columns
.Bound(o => o.OrderID).Width(81);
            columns
.Bound(o => o.Customer.ContactName).Width(200);
            columns
.Bound(o => o.ShipAddress);
            columns
.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(100);
       
})
%>

[GridAction]
public ActionResult _AjaxBinding()
{
   
return View(new GridModel(GetOrders()));
}

I get all the orders from the database in memory and using linq i extract the orders corresponding to the current page?
I hope i got this wrong because normally you extract from the database only the records correspnding to the current page, sorting, etc..

Later edit: Because of my long nose i didn't see custom binding which is what i was talking about. Sorry for posting such silly question.
Tags
Grid
Asked by
bogus
Top achievements
Rank 1
Share this question
or