Class DataGrid
- Namespace
- Forma
- Assembly
- Forma.dll
Displays tabular data with virtualized rows, configurable columns, sorting, filtering, and row or cell selection.
[TemplatePart("PART_ScrollPresenter", typeof(ScrollPresenter), true)]
[TemplatePart("PART_ItemsPresenter", typeof(ItemsPresenter), true)]
[TemplatePart("PART_ColumnHeaders", typeof(GridPanel), true)]
public class DataGrid : ListBox, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable, IItemsPresenterOwner, IItemContainerGenerator, IScrollViewportOwner
- Inheritance
-
DataGrid
- Implements
- Inherited Members
Constructors
DataGrid()
public DataGrid()
Fields
ColumnHeadersPartName
public const string ColumnHeadersPartName = "PART_ColumnHeaders"
Field Value
DefaultAsynchronousSortThreshold
public const int DefaultAsynchronousSortThreshold = 1000
Field Value
DefaultColumnHeaderHeight
public const float DefaultColumnHeaderHeight = 34
Field Value
DefaultEstimatedRowExtent
public const float DefaultEstimatedRowExtent = 30
Field Value
HorizontalScrollBarPresenterPartName
public const string HorizontalScrollBarPresenterPartName = "PART_HorizontalScrollBarPresenter"
Field Value
MaximumSupportedVisibleColumns
public const int MaximumSupportedVisibleColumns = 256
Field Value
VerticalScrollBarPresenterPartName
public const string VerticalScrollBarPresenterPartName = "PART_VerticalScrollBarPresenter"
Field Value
Properties
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
AlternatingRowBackground
public bool AlternatingRowBackground { get; set; }
Property Value
AsynchronousSortThreshold
public int AsynchronousSortThreshold { get; set; }
Property Value
CanRealizeItems
protected override bool CanRealizeItems { get; }
Property Value
CanUserResizeColumns
public bool CanUserResizeColumns { get; set; }
Property Value
CanUserSortColumns
public bool CanUserSortColumns { get; set; }
Property Value
Columns
public ObservableCollection<DataGridColumn> Columns { get; }
Property Value
CurrentCell
public CellIndex? CurrentCell { get; set; }
Property Value
CurrentRowPath
public IndexPath? CurrentRowPath { get; }
Property Value
Filter
public Predicate<object> Filter { get; set; }
Property Value
FilterMode
public DataGridFilterMode FilterMode { get; set; }
Property Value
HierarchySource
public IDataGridSource HierarchySource { get; }
Property Value
HorizontalScrollBar
public HScrollBar HorizontalScrollBar { get; }
Property Value
HorizontalScrollMode
public ScrollBarVisibility HorizontalScrollMode { get; set; }
Property Value
IsSorting
public bool IsSorting { get; }
Property Value
ItemsSource
public IEnumerable ItemsSource { get; set; }
Property Value
Mode
public DataGridMode Mode { get; set; }
Property Value
RealizedCellCount
public int RealizedCellCount { get; }
Property Value
SelectedCells
public IReadOnlyList<CellIndex> SelectedCells { get; }
Property Value
SelectedRowPaths
public IReadOnlyList<IndexPath> SelectedRowPaths { get; }
Property Value
SelectionMode
public ItemListSelectionMode SelectionMode { get; set; }
Property Value
SelectionUnit
public DataGridSelectionUnit SelectionUnit { get; set; }
Property Value
ShowHorizontalGridLines
public bool ShowHorizontalGridLines { get; set; }
Property Value
ShowVerticalGridLines
public bool ShowVerticalGridLines { get; set; }
Property Value
SortDescriptions
public ObservableCollection<DataGridSortDescription> SortDescriptions { get; }
Property Value
VerticalScrollBar
public VScrollBar VerticalScrollBar { get; }
Property Value
VerticalScrollMode
public ScrollBarVisibility VerticalScrollMode { get; set; }
Property Value
Methods
ActivateColumnHeader(int, bool)
public void ActivateColumnHeader(int columnIndex, bool additive = false)
Parameters
ArrangeChildren()
protected override void ArrangeChildren()
ClearCellSelection()
public void ClearCellSelection()
ClearContainerForItem(Control, object)
protected override void ClearContainerForItem(Control container, object item)
Parameters
Collapse(IndexPath)
public bool Collapse(IndexPath path)
Parameters
pathIndexPath
Returns
CollapseAll(Func<object, bool>)
public int CollapseAll(Func<object, bool> predicate = null)
Parameters
Returns
Dispose()
public override void Dispose()
Expand(IndexPath)
public bool Expand(IndexPath path)
Parameters
pathIndexPath
Returns
ExpandAll(Func<object, bool>)
public int ExpandAll(Func<object, bool> predicate = null)
Parameters
Returns
GetCell(int, int)
public DataGridCell GetCell(int rowIndex, int columnIndex)
Parameters
Returns
GetColumnHeader(int)
public DataGridColumnHeader GetColumnHeader(int columnIndex)
Parameters
columnIndexint
Returns
GetContainerForItem(object)
protected override Control GetContainerForItem(object item)
Parameters
itemobject
Returns
GetDisplayColumns()
public IReadOnlyList<DataGridColumn> GetDisplayColumns()
Returns
GetRowPath(int)
public IndexPath GetRowPath(int rowIndex)
Parameters
rowIndexint
Returns
IsContainerCompatibleForItem(Control, object)
protected override bool IsContainerCompatibleForItem(Control container, object item)
Parameters
Returns
OnItemsChanged()
protected override void OnItemsChanged()
OnScrollMetricsChanged(ScrollMetrics)
protected override void OnScrollMetricsChanged(ScrollMetrics metrics)
Parameters
metricsScrollMetrics
OnTemplateApplied()
protected override void OnTemplateApplied()
PrepareContainerForItem(Control, object, int)
protected override void PrepareContainerForItem(Control container, object item, int index)
Parameters
RefreshFilter()
public void RefreshFilter()
ResizeColumn(int, float)
public void ResizeColumn(int columnIndex, float width)
Parameters
SelectCell(CellIndex, bool)
public void SelectCell(CellIndex cell, bool additive = false)
Parameters
SelectCellRange(CellIndex, CellIndex)
public void SelectCellRange(CellIndex anchor, CellIndex target)
Parameters
SelectItemFromPointer(int, Point)
protected override void SelectItemFromPointer(int index, Point point)
Parameters
indexintpointPoint
SelectRowHeader(IndexPath, bool, bool)
public void SelectRowHeader(IndexPath rowPath, bool additive = false, bool extendRange = false)
Parameters
Toggle(IndexPath)
public bool Toggle(IndexPath path)
Parameters
pathIndexPath
Returns
ToggleCell(CellIndex)
public void ToggleCell(CellIndex cell)
Parameters
cellCellIndex
UpdateContainerPosition(Control, object, int, int)
protected override void UpdateContainerPosition(Control container, object item, int index, int alternationIndex)
Parameters
Events
CellSelectionChanged
public event EventHandler<DataGridCellSelectionChangedEventArgs> CellSelectionChanged