Lynn Emery

Lynn Emery

  • NA
  • 47
  • 56.3k

Sorting data in grid view

Mar 21 2013 5:41 AM
Hi I have a datagrid which has various columns, including customer.
I want the user to select the customer header and the data to then be sorted by customer name alphabetically.

I have added a sort expression to the data grid;

<asp:BoundField DataField="Customer"HeaderText="Customer" SortExpression="Customer"/>

However I get the following error:
The data source does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and dataSet.

I understand that the problem relates to BLL and DAL file however I am unsure how
to resolve the problem.

Does anyone know a simple solution to ressolve this problem?

Thank you for your help.


Answers (1)