I have the following mapped in my Entity Data Model to my Database
I then created a partial class, which gives an additional property to Products
public partial class Product
public DateTime LatestDate
if(UpdateDate.HasValue) return UpdateDate.Value;
I then did the following:
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
GridLines="None" onitemcreated="RadGrid1_ItemCreated" AllowSorting="True">
MasterTableView DataSourceID="EntityDataSource1" DataKeyNames="Id">
telerik:GridSortExpression FieldName="LastDate" SortOrder="Descending" />
Unfortunately, this does not work. I can easily show the created field LastDate in the Grid, but sorting won't work. It gives me the following error:
'LastDate' is not a member of type 'TwModel.Product' in the currently loaded schemas. Near simple identifier, line 6, column 4
I guess in means that sorting works only for what is availabe in the database schema, but how would I accomplish the above with an additional calculated property, i.e. LastDate?