(Intermediate) - Sorting a DataGrid

Added By: patoooey

Rated:
(3 of 5) by 3.
Rate Snippet:
Description:  Example to show how to sort a DataGrid. No caching used. Database is queried each post. Most samples out there say you HAVE to have AutoGenerateColumns="True" in order to sort. That means you can't set the HeaderText or use columns. Those samples are with the Beta versions of .NET. You must change the connection string, SQL and datagrid <Columns> to match your configuration. Tested with Premium account. http://patoooey.brinkster.net/CodeBank/SortDataGrid.aspx
Language:  C#

Save to web space
E-mail Link

Code Snippet: