i have used aggregate function in List Page of dynamic datawebsite. When it execute it gives me, DataBinding: 'DynamicClass1' does not contain a property with the name 'EmployeeID'.
<asp:GridView ID="GridView1" runat="server" DataSourceID="GridDataSource"
AllowPaging="True" AllowSorting="True" CssClass="gridview">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink ID="EditHyperLink" runat="server"
NavigateUrl='<%# table.GetActionPath(PageAction.Edit, GetDataItem()) %>'
Text="Edit" /> <asp:LinkButton ID="DeleteLinkButton" runat="server" CommandName="Delete"
CausesValidation="false" Text="Delete"
OnClientClick='return confirm("Are you sure you want to delete this item?");'
/> <asp:HyperLink ID="DetailsHyperLink" runat="server"
NavigateUrl='<%# table.GetActionPath(PageAction.Details, GetDataItem()) %>'
Text="Details" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle CssClass="footer"/>
<PagerTemplate>
<asp:GridViewPager runat="server" />
</PagerTemplate>
<EmptyDataTemplate>
There are currently no items in this table.
</EmptyDataTemplate>
</asp:GridView>
<asp:LinqDataSource ID="GridDataSource" runat="server"
ContextTypeName="DataClassesDataContext"
TableName="Employees"
GroupBy="EmployeeNo"
Select="new(Key,
Max(Version) As VersionNo)"
EnableDelete="true">
<WhereParameters>
<asp:DynamicControlParameter ControlID="FilterRepeater" />
</WhereParameters>
</asp:LinqDataSource>
I have not changed any of the default code except i have added ContextTypeName,TableName, GroupBy and select in Linq Data source... Table "Employees" has "EmployeeID, EmployeeNo, EmployeeName, Department, Address, City, State, Country, Version" as columns..
Any idea how to solve this?
Thanks in advance!
Regards, Bala