DataGridView.Sort Method

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Sorts the contents of the DataGridView control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

NameDescription
System_CAPS_pubmethodSort(DataGridViewColumn, ListSortDirection)

Sorts the contents of the DataGridView control in ascending or descending order based on the contents of the specified column.

System_CAPS_pubmethodSort(IComparer)

Sorts the contents of the DataGridView control using an implementation of the IComparer interface.

Return to top
Show: