ComponentOne GridView for ASP.NET AJAX: GridView for ASP.NET AJAX Task-Based Help > Formatting the Grid's Content > Automatically Sorting Columns

Automatically Sorting Columns

To configure the grid to automatically sort a column, complete the following steps:

1.   Select the C1GridView control and set the AllowSorting property to True.

      Visual Basic

C1GridView1.AllowSorting = True

      C#

C1GridView1.AllowSorting = true;

2.   Set the C1GridView.DataSourceID property.

3.   Run your application and click the HeaderText of the column you want to sort.

* Sample Project Available

For the complete sample, see the Sorting2 sample located on the ComponentOne HelpCentral Sample page.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.