Table of Contents

Class NoxGridRowCollection

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

Row collection. Use it like grid.Rows.Add("S001", 10, DateTime.Today), grid.Rows.RemoveAt(3), grid.Rows[3].Height = 40. In bound mode, rows are added to and removed from the data source.

public sealed class NoxGridRowCollection : IEnumerable<NoxGridRow>, IEnumerable
Inheritance
NoxGridRowCollection
Implements
Inherited Members

Properties

Count

Number of rows.

public int Count { get; }

Property Value

int

this[int]

Row object for a row index. It keeps pointing at the same row after inserts, removals and sorting.

public NoxGridRow this[int rowIndex] { get; }

Parameters

rowIndex int

Property Value

NoxGridRow

Methods

Add()

Appends an empty row and returns the new row index.

public int Add()

Returns

int

Add(params object[])

Appends a row (values in Columns order). Returns the new row index.

public int Add(params object[] values)

Parameters

values object[]

Returns

int

AddRange(int)

Appends count empty rows (unbound).

public void AddRange(int count)

Parameters

count int

Clear()

Removes all rows (columns are kept).

public void Clear()

GetEnumerator()

public IEnumerator<NoxGridRow> GetEnumerator()

Returns

IEnumerator<NoxGridRow>

IndexOfKey(object)

Index of the row whose Key equals key (-1 if none). Bound grids with RowKeyMember read the key field.

public int IndexOfKey(object key)

Parameters

key object

Returns

int

IndexOfTag(object)

Index of the first row whose Tag equals tag (-1 if none).

public int IndexOfTag(object tag)

Parameters

tag object

Returns

int

Insert(int)

Inserts one empty row at index (unbound).

public void Insert(int index)

Parameters

index int

Insert(int, params object[])

Inserts a row with values at index (unbound).

public void Insert(int index, params object[] values)

Parameters

index int
values object[]

InsertRange(int, int)

Inserts count empty rows at index (unbound).

public void InsertRange(int index, int count)

Parameters

index int
count int

Remove(NoxGridRow)

Removes the row (it must belong to this grid and not be removed already).

public void Remove(NoxGridRow row)

Parameters

row NoxGridRow

RemoveAll(Predicate<NoxGridRow>)

Removes every row that matches (e.g. checked rows). Returns the number of removed rows. One undo step.

public int RemoveAll(Predicate<NoxGridRow> match)

Parameters

match Predicate<NoxGridRow>

Returns

int

RemoveAt(int)

Removes one row (bound: deletes it from the data source).

public void RemoveAt(int index)

Parameters

index int

RemoveRange(int, int)

Removes count rows starting at index.

public void RemoveRange(int index, int count)

Parameters

index int
count int

RemoveRows(IEnumerable<NoxGridRow>)

Removes several rows at once (any order, duplicates and removed rows are skipped). One undo step.

public void RemoveRows(IEnumerable<NoxGridRow> rows)

Parameters

rows IEnumerable<NoxGridRow>

RemoveRows(IEnumerable<int>)

Removes the rows with these indexes at once (any order, duplicates are skipped). One undo step.

public void RemoveRows(IEnumerable<int> rowIndexes)

Parameters

rowIndexes IEnumerable<int>