0

这是我只能编辑的代码:

ICCModelController ctrl = ControllerGettersFactory.ModelControllerGetters().CCModelController;
IList list = ctrl.SearchCareersWithCategories(null, 0, DateTime.Today);

CareerGrid.DataSource = list;
CareerGrid.DataBind();

当前的“CareerGrid”网格视图导致“日期”列的升序。我希望它按降序排列。

4

1 回答 1

1
CareerGrid.DataSource = list.OrderByDescending(x=>x.Date);
CareerGrid.DataBind();

或者,如果它已经按日期排序

CareerGrid.DataSource = list.Reverse();
CareerGrid.DataBind();
于 2012-07-12T11:40:57.987 回答