Class GroupGridListDataAdapter<T>
Adapts a list of POCO objects to the IGroupGridDataAdapter contract.
public class GroupGridListDataAdapter<T> : IGroupGridDataAdapter, IDisposable
Type Parameters
TThe row type.
- Inheritance
-
GroupGridListDataAdapter<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
GroupGridListDataAdapter(IList<T>)
Initializes a new instance of the GroupGridListDataAdapter<T> class.
public GroupGridListDataAdapter(IList<T> Items)
Parameters
ItemsIList<T>The source item list.
Properties
RowCount
Gets the number of rows exposed by the adapter.
public int RowCount { get; }
Property Value
Methods
CanDeleteRow(int)
Returns true when the adapter can delete a specified row.
public bool CanDeleteRow(int RowIndex)
Parameters
RowIndexintThe adapter row index.
Returns
- bool
True when the row can be deleted; otherwise, false.
CanInsertRow(int)
Returns true when the adapter can insert a new row after a specified row index.
public bool CanInsertRow(int RowIndex)
Parameters
RowIndexintThe adapter row index, or -1 to insert at the start.
Returns
- bool
True when a new row can be inserted; otherwise, false.
CanSetValue(int, GroupGridColumn)
Returns true when a value can be set at a specified adapter row index and grid column.
public bool CanSetValue(int RowIndex, GroupGridColumn Column)
Parameters
RowIndexintThe adapter row index.
ColumnGroupGridColumnThe grid column.
Returns
- bool
True when the cell value can be set; otherwise, false.
DeleteRow(int)
Deletes a specified row.
public bool DeleteRow(int RowIndex)
Parameters
RowIndexintThe adapter row index.
Returns
- bool
True if the row was deleted; otherwise, false.
Dispose()
Releases subscriptions held by this adapter.
public void Dispose()
GetRow(int)
Returns the source row at a specified adapter row index.
public object GetRow(int RowIndex)
Parameters
RowIndexintThe adapter row index.
Returns
- object
The source row.
GetValue(int, GroupGridColumn)
Returns the cell value at a specified adapter row index and grid column.
public object GetValue(int RowIndex, GroupGridColumn Column)
Parameters
RowIndexintThe adapter row index.
ColumnGroupGridColumnThe grid column.
Returns
- object
The cell value.
InsertRow(int)
Inserts a new row after a specified row index.
public int InsertRow(int RowIndex)
Parameters
RowIndexintThe adapter row index, or -1 to insert at the start.
Returns
- int
The inserted adapter row index, or -1 when no row was inserted.
SetValue(int, GroupGridColumn, object)
Sets the cell value at a specified adapter row index and grid column.
public void SetValue(int RowIndex, GroupGridColumn Column, object Value)
Parameters
RowIndexintThe adapter row index.
ColumnGroupGridColumnThe grid column.
ValueobjectThe value to set.
Events
Changed
Occurs when rows or cell values exposed by the adapter change.
public event EventHandler<GroupGridDataChangedEventArgs> Changed