5
Xem mã bên dưới, tôi không biết tại sao đặt hàng của tôi không hoạt động, bất kỳ ý tưởng nào?Làm thế nào để đặt hàng một số IE2umercủa vô danh?
var orderSample = new { ProductName = "", Qty = 0, UserFullName = "" };
var ordersList = (new[] { orderSample }).ToList();
//loop thru another collection and fill ordersList by adding an order at a time
ordersList.Add(new { ProductName = "Product1", Qty = 5, UserFullName = "Mr. Smith" });
//sort the orders by name - DOESN'T WORK
ordersList.OrderBy(p => p.ProductName);
gvReport3.DataSource = ordersList;
gvReport3.DataBind();
cảm ơn, hoạt động tuyệt vời !!! –