Skip to content

Commit

Permalink
Rename enums
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Nov 13, 2024
1 parent 6292cd8 commit 3d04dd5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
/// </summary>
public enum DataGridCellFilterType
{
/// <summary>
/// Represents a single filter, allowing only one value.
/// </summary>
Single,
Range1,
Range2

/// <summary>
/// Represents the starting value of a range filter.
/// </summary>
RangeFrom,

/// <summary>
/// Represents the ending value of a range filter.
/// </summary>
RangeTo,
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
{
return Column.Filter.SearchValue?.ToString();
}
else if ( CellFilterType == DataGridCellFilterType.Range1 )
else if ( CellFilterType == DataGridCellFilterType.RangeFrom )
{
return GetFilterValue1()?.ToString();
}
else if ( CellFilterType == DataGridCellFilterType.Range2 )
else if ( CellFilterType == DataGridCellFilterType.RangeTo )
{
return GetFilterValue2()?.ToString();
}
Expand All @@ -64,11 +64,11 @@
{
return Column.Filter.SearchValue;
}
else if ( CellFilterType == DataGridCellFilterType.Range1 )
else if ( CellFilterType == DataGridCellFilterType.RangeFrom )
{
return GetFilterValue1();
}
else if ( CellFilterType == DataGridCellFilterType.Range2 )
else if ( CellFilterType == DataGridCellFilterType.RangeTo )
{
return GetFilterValue2();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<Field @key=filterMethod>
@if ( filterMethod == DataGridColumnFilterMethod.Between )
{
<_DataGridCellFilter Column="Column" CellFilterType="DataGridCellFilterType.Range1" OnFilterChanged="@SetFilterValue1" />
<_DataGridCellFilter Column="Column" CellFilterType="DataGridCellFilterType.Range2" OnFilterChanged="@SetFilterValue2" />
<_DataGridCellFilter Column="Column" CellFilterType="DataGridCellFilterType.RangeFrom" OnFilterChanged="@SetFilterValue1" />
<_DataGridCellFilter Column="Column" CellFilterType="DataGridCellFilterType.RangeTo" OnFilterChanged="@SetFilterValue2" />
}
else
{
Expand Down

0 comments on commit 3d04dd5

Please sign in to comment.