Table of Contents

Class NoxGridSortCompareEventArgs

Namespace
Nox.Grid.WinForms
Assembly
Nox.Grid.WinForms.dll

SortCompare: the app compares two cells while the grid sorts (unbound grid). Set SortResult and Handled = True. As in DataGridView, return the result for ascending order; the grid reverses it for a descending sort. Return 0 for equal values to keep their current order (in both directions).

public class NoxGridSortCompareEventArgs : HandledEventArgs
Inheritance
NoxGridSortCompareEventArgs
Inherited Members

Constructors

NoxGridSortCompareEventArgs(NoxGridColumn, int, int, object, object, NoxSortOrder)

Creates the event data.

public NoxGridSortCompareEventArgs(NoxGridColumn column, int rowIndex1, int rowIndex2, object cellValue1, object cellValue2, NoxSortOrder sortOrder)

Parameters

column NoxGridColumn
rowIndex1 int
rowIndex2 int
cellValue1 object
cellValue2 object
sortOrder NoxSortOrder

Properties

CellValue1

Value of the first cell.

public object CellValue1 { get; }

Property Value

object

CellValue2

Value of the second cell.

public object CellValue2 { get; }

Property Value

object

Column

The sort column.

public NoxGridColumn Column { get; }

Property Value

NoxGridColumn

RowIndex1

Row index of the first cell (row order before this sort; read other cells of the row with it).

public int RowIndex1 { get; }

Property Value

int

RowIndex2

Row index of the second cell (row order before this sort).

public int RowIndex2 { get; }

Property Value

int

SortOrder

Direction of this sort. The grid reverses SortResult when it is Descending.

public NoxSortOrder SortOrder { get; }

Property Value

NoxSortOrder

SortResult

Less than 0: the first cell comes first (in ascending order). 0: equal (current order kept). Greater than 0: the second cell comes first.

public int SortResult { get; set; }

Property Value

int