Using ASP.NET Dynamic Data with LINQ to SQL DataContext from a Northwind Database ...
When I add a DisplayColumn attribute to one of my LINQ to SQL classes entityand reference a property from my custom code in a partial class, I lose the ability to sort by this column in the generated GridView. I still lose the ability to sort, even if I refer to a non-standard property like sortColumn.
Why is this happening?
Code example:
[DisplayColumn("LastNameFirstName", "LastName", false)]
public partial class Employee
{
public string LastNameFirstName
{
get { return LastName + ", " + FirstName; }
}
}
Aaron
EDIT: sortColumnindicates the column that will be used to sort this object when it is used as a foreign key (in DropDownList), and not when it is sorted in a GridView.