I am using the ADO.NET Entity Framework data model. I send data from SQL to a GridView via ADO.NET Entity Framework.
But how can i sort gridview'columns click if i use EF
I am using the ADO.NET Entity Framework data model. I send data from SQL to a GridView via ADO.NET Entity Framework.
But how can i sort gridview'columns click if i use EF
Are you using an EntityDataSource
? Have you enabled the AllowSorting
and AllowPaging
properties on the GridView ?
<asp:GridView ID="GridView1" runat="server"
AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="True"
DataSourceID="EntityDataSource1">
</asp:GridView>
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="......"
EntitySetName="......."
Select=".........." OrderBy="......">
</asp:EntityDataSource>
Marc