If you are wanting it sorted only once, try sorting the data before you bind it to the grid. Otherwise, if you are using visual studio, you can create the gridview and select the data source within design view and it will create the code to sort any column at runtime for you.
|