Class NoxGridRowCollection
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
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
rowIndexint
Property Value
Methods
Add()
Appends an empty row and returns the new row index.
public int Add()
Returns
Add(params object[])
Appends a row (values in Columns order). Returns the new row index.
public int Add(params object[] values)
Parameters
valuesobject[]
Returns
AddRange(int)
Appends count empty rows (unbound).
public void AddRange(int count)
Parameters
countint
Clear()
Removes all rows (columns are kept).
public void Clear()
GetEnumerator()
public IEnumerator<NoxGridRow> GetEnumerator()
Returns
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
keyobject
Returns
IndexOfTag(object)
Index of the first row whose Tag equals tag (-1 if none).
public int IndexOfTag(object tag)
Parameters
tagobject
Returns
Insert(int)
Inserts one empty row at index (unbound).
public void Insert(int index)
Parameters
indexint
Insert(int, params object[])
Inserts a row with values at index (unbound).
public void Insert(int index, params object[] values)
Parameters
InsertRange(int, int)
Inserts count empty rows at index (unbound).
public void InsertRange(int index, int count)
Parameters
Remove(NoxGridRow)
Removes the row (it must belong to this grid and not be removed already).
public void Remove(NoxGridRow row)
Parameters
rowNoxGridRow
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
matchPredicate<NoxGridRow>
Returns
RemoveAt(int)
Removes one row (bound: deletes it from the data source).
public void RemoveAt(int index)
Parameters
indexint
RemoveRange(int, int)
Removes count rows starting at index.
public void RemoveRange(int index, int count)
Parameters
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
rowsIEnumerable<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
rowIndexesIEnumerable<int>