何らかの理由で、MVContrib グリッドの並べ替えを機能させることができません。
次のコードの結果がグリッドになるのに、並べ替え可能な列がないのはなぜですか?
MVC3 と Razor 構文を使用しています。
@model List<InboundShipmentItem>
@using MvcContrib.UI.Grid
@Html.Grid(Model).Sort((GridSortOptions)ViewBag.SortOptions).Columns(column =>
{
column.For(item => !item.Verified ? Ajax.ActionLink("Receive", "ReceiveItem", new {id = @item.Id},
new AjaxOptions
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "grid",
OnSuccess = "InboundShipmentVerification.ReceiveItemSucceeded",
OnFailure = "InboundShipmentVerification.ReceiveItemFailed"
}).ToString() : "Received").Named("Received?").Encode(false);
column.For(item => item.PONumber).Named("PO#").Sortable(true);
column.For(item => item.ShipQty).Named("Qty Sent").Sortable(true).SortColumnName("Qty");
column.For(item => item.ReceivedQty).Named("Qty Recd");
column.For(item => item.ISBN).Named("ISBN");
column.For(item => item.Title).Named("Title");
column.For(item => item.Author).Named("Author");
column.For(item => item.InboundShipment.Status).Named("Shipment Status");
column.For(item => item.InboundShipment.ShipmentId).Named("Shipment #");
})