DataGridViewColumnSortMode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines how a DataGridView column can be sorted by the user.
public enum class DataGridViewColumnSortMode
public enum DataGridViewColumnSortMode
type DataGridViewColumnSortMode =
Public Enum DataGridViewColumnSortMode
- Inheritance
Fields
Automatic | 1 | The user can sort the column by clicking the column header (or pressing F3 on a cell) unless the column headers are used for selection. A sorting glyph will be displayed automatically. |
NotSortable | 0 | The column can only be sorted programmatically, but it is not intended for sorting, so the column header will not include space for a sorting glyph. |
Programmatic | 2 | The column can only be sorted programmatically, and the column header will include space for a sorting glyph. |
Examples
The following code example illustrates the use of this type. For more information, see How to: Set the Sort Modes for Columns in the Windows Forms DataGridView Control.
this.dataGridView1.Columns["Priority"].SortMode =
DataGridViewColumnSortMode.Automatic;
Me.dataGridView1.Columns("Priority").SortMode = _
DataGridViewColumnSortMode.Automatic
Remarks
Each column may have a different sort mode specified by the SortMode property.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기