ColumnHeaderCell のソートマークを初期状態に戻すには?
対象製品
MultiRow for Windows Forms 5.0J
詳細
ColumnHeaderCell の組み込みソートを使用すると、ソートマーク(三角形のマーク)で現在のソート状態を示すことができます。このソートマークを初期状態の非表示にするには、次のようにコーディングします。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.MultiRow
Private Sub ClearColumnHeaderCellSortGlyphDirection(ByVal gcMultiRow As GcMultiRow)
For Each section As ColumnHeaderSection In gcMultiRow.ColumnHeaders
For Each cell As Cell In section.Cells
If TypeOf cell Is ColumnHeaderCell Then
Dim columnHeaderCell As ColumnHeaderCell = TryCast(cell, ColumnHeaderCell)
columnHeaderCell.SortGlyphDirection = SortOrder.None
End If
Next
Next
End Sub
' 使用例
ClearColumnHeaderCellSortGlyphDirection(Me.GcMultiRow1)
Private Sub ClearColumnHeaderCellSortGlyphDirection(ByVal gcMultiRow As GcMultiRow)
For Each section As ColumnHeaderSection In gcMultiRow.ColumnHeaders
For Each cell As Cell In section.Cells
If TypeOf cell Is ColumnHeaderCell Then
Dim columnHeaderCell As ColumnHeaderCell = TryCast(cell, ColumnHeaderCell)
columnHeaderCell.SortGlyphDirection = SortOrder.None
End If
Next
Next
End Sub
' 使用例
ClearColumnHeaderCellSortGlyphDirection(Me.GcMultiRow1)
[C#]
using GrapeCity.Win.MultiRow;
private void ClearColumnHeaderCellSortGlyphDirection(GcMultiRow gcMultiRow)
{
foreach (ColumnHeaderSection section in gcMultiRow.ColumnHeaders)
{
foreach (Cell cell in section.Cells)
{
if (cell is ColumnHeaderCell)
{
ColumnHeaderCell columnHeaderCell = cell as ColumnHeaderCell;
columnHeaderCell.SortGlyphDirection = SortOrder.None;
}
}
}
}
// 使用例
ClearColumnHeaderCellSortGlyphDirection(this.gcMultiRow1);
private void ClearColumnHeaderCellSortGlyphDirection(GcMultiRow gcMultiRow)
{
foreach (ColumnHeaderSection section in gcMultiRow.ColumnHeaders)
{
foreach (Cell cell in section.Cells)
{
if (cell is ColumnHeaderCell)
{
ColumnHeaderCell columnHeaderCell = cell as ColumnHeaderCell;
columnHeaderCell.SortGlyphDirection = SortOrder.None;
}
}
}
}
// 使用例
ClearColumnHeaderCellSortGlyphDirection(this.gcMultiRow1);
この文書は、以前は次のFAQ IDで公開されていました : 11656