Browse Source

Update DataGridColumn.cs

pull/6730/head
0x90d 5 years ago
committed by GitHub
parent
commit
b473892649
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      src/Avalonia.Controls.DataGrid/DataGridColumn.cs

20
src/Avalonia.Controls.DataGrid/DataGridColumn.cs

@ -653,6 +653,26 @@ namespace Avalonia.Controls
return null;
}
/// <summary>
/// Switches the current state of sort direction
/// </summary>
/// <param name="clear">Clear the current sort direction instead</param>
public void PerformSort(bool clear)
{
//InvokeProcessSort is already validating if sorting is possible
_headerCell?.InvokeProcessSort(clear ? Input.KeyModifiers.Control : Input.KeyModifiers.None);
}
/// <summary>
/// Changes the sort direction of this column
/// </summary>
/// <param name="direction">New sort direction</param>
public void PerformSort(ListSortDirection direction)
{
//InvokeProcessSort is already validating if sorting is possible
_headerCell?.InvokeProcessSort(Input.KeyModifiers.None, direction);
}
/// <summary>
/// When overridden in a derived class, causes the column cell being edited to revert to the unedited value.
/// </summary>

Loading…
Cancel
Save