This question is locked. New answers and comments are not allowed.
Hi
I am binding a list of records to a grid with Ajax. My service that returns the list is using custom business logic to order the records and I have not applied any sorting on the grid itself. The problem is that the order of the records when they are bound to the grid are seemilngly randong ie they are different to the order when I view the list in the watch window of the controller while in debug mode.
Anyone else experience this? Anyone know why?
Here is the grid in the view, and the controller action
I am binding a list of records to a grid with Ajax. My service that returns the list is using custom business logic to order the records and I have not applied any sorting on the grid itself. The problem is that the order of the records when they are bound to the grid are seemilngly randong ie they are different to the order when I view the list in the watch window of the controller while in debug mode.
Anyone else experience this? Anyone know why?
Here is the grid in the view, and the controller action
@{ Html.Telerik().Grid<Swap>() .DataBinding(x => x.Ajax().Select("GetMappedSwaps", "Bond", new { bondId = Model.Id })) .Name("MappedSwapsGrid") .Scrollable(x => x.Height(100)) .Footer(false) .Columns(columns => { columns.Bound(o => o.SourceSystemID).Title("Calypso Ref Id").Width(120); columns.Bound(o => o.TradeDate).Format("{0:dd-MMM-yyyy}").Width(120); columns.Bound(o => o.StartDate).Format("{0:dd-MMM-yyyy}").Width(120); columns.Bound(o => o.MaturityDate).Format("{0:dd-MMM-yyyy}").Width(120); columns.Bound(o => o.Leg1Currency).Width(120); columns.Bound(o => o.Leg1CurrencyAmount).Width(180); columns.Bound(o => o.Leg1Frequency).Width(120); columns.Bound(o => o.Leg1FixedInterestRate).Width(180); columns.Bound(o => o.Leg1FloatingRateMargin).Width(180); columns.Bound(o => o.Leg1FloatingIndex).Width(160); columns.Bound(o => o.Leg2ReceiverShortName).Width(180); columns.Bound(o => o.Leg2InterestType).Width(140); columns.Bound(o => o.Leg2Currency).Width(120); columns.Bound(o => o.Leg2CurrencyAmount).Width(180); columns.Bound(o => o.Leg2Frequency).Width(120); columns.Bound(o => o.Leg2FixedInterestRate).Width(180); columns.Bound(o => o.Leg2FloatingRateMargin).Width(180); columns.Bound(o => o.Leg2FloatingIndex).Width(160); }) .Render(); }[GridAction]public ActionResult GetMappedSwaps(long bondId){ var swaps = _swapService.GetMappedSwapsForBond(bondId); return View(new GridModel(swaps));}