====== API: Data Controls ====== API Reference for data views and grids. ===== TWvdSDataGrid ===== Powerful data grid. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ ItemsSource | IEnumerable | nil | Data source | ^ SelectedItem | TObject | nil | Selected row | ^ SelectedItems | IList | nil | Multiple selection | ^ Columns | TWvdSColumnCollection | nil | Column definition | ^ AutoGenerateColumns | Boolean | True | Auto columns | ^ CanUserSort | Boolean | True | Sorting allowed | ^ CanUserFilter | Boolean | True | Filtering allowed | ^ CanUserGroup | Boolean | False | Grouping allowed | ^ CanUserReorderColumns | Boolean | True | Column reorder | ^ CanUserResizeColumns | Boolean | True | Column resize | ^ SelectionMode | TWvdSSelectionMode | smSingle | Single, Multiple, Extended | ^ RowHeight | Integer | 25 | Row height | ^ AlternatingRowBackground | TWvdSBrush | nil | Alternating row color | ==== Column Types ==== | Type | Description | ^ TextColumn | Text column | ^ NumberColumn | Numeric column with format | ^ DateColumn | Date column | ^ CheckBoxColumn | Boolean column | ^ ComboBoxColumn | Dropdown column | ^ TemplateColumn | Custom column | ==== Events ==== | Event | Signature | Description | ^ OnSelectionChanged | TSelectionChangedEvent | Selection changed | ^ OnCellClick | TCellClickEvent | Cell clicked | ^ OnRowDoubleClick | TRowEvent | Row double-click | ^ OnSortChanged | TSortEvent | Sort changed | ==== TUI Note ==== In TUI target, virtualization is used. Only visible rows are rendered. ---- ===== TWvdSTreeList ===== Hierarchical tree view with columns. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ ItemsSource | IEnumerable | nil | Root data | ^ ChildrenPath | string | 'Children' | Path to children | ^ SelectedNode | TObject | nil | Selected node | ^ ExpandedNodes | IList | nil | Expanded nodes | ^ Columns | TWvdSColumnCollection | nil | Columns | ^ ShowLines | Boolean | True | Connection lines | ^ ShowRootLines | Boolean | True | Root lines | ==== Events ==== | Event | Signature | Description | ^ OnNodeExpanding | TNodeEvent | Node is expanding | ^ OnNodeCollapsing | TNodeEvent | Node is collapsing | ^ OnSelectedNodeChanged | TNodeEvent | Selection changed | ---- ===== TWvdSCardView ===== Card-based data view. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ ItemsSource | IEnumerable | nil | Data source | ^ CardTemplate | TWvdSDataTemplate | nil | Card template | ^ CardWidth | Integer | 200 | Card width | ^ CardHeight | Integer | 150 | Card height | ^ Orientation | TWvdSOrientation | oHorizontal | Arrangement | ---- ===== TWvdSPivotGrid ===== Pivot table for data analysis. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ DataSource | IEnumerable | nil | Data source | ^ RowFields | TPivotFieldCollection | nil | Row fields | ^ ColumnFields | TPivotFieldCollection | nil | Column fields | ^ DataFields | TPivotFieldCollection | nil | Data fields | ^ FilterFields | TPivotFieldCollection | nil | Filter fields | ---- ===== TWvdSVerticalGrid ===== Vertical property grid. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ SelectedObject | TObject | nil | Edited object | ^ Rows | TVerticalGridRowCollection | nil | Row definition | ^ CategoryMode | Boolean | False | Show categories | ---- ===== TWvdSBandedGridView ===== Grid with column bands. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSLayoutView ===== Form layout view. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSWinExplorerView ===== Windows Explorer-style view. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Type | Default | Description | ^ ViewMode | TWvdSExplorerViewMode | evmList | ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, List, Details, Tiles, Content | ^ ThumbnailField | string | '' | Thumbnail field | ^ TextField | string | '' | Text field | ---- ===== TWvdSTileView ===== Tile view for data. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSServerModeSource ===== Server-side data source for large datasets. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== Syntax ==== TServerModeSource = class property KeyExpression: string; property QueryableSource: IQueryable; procedure Reload; end; ==== Usage ==== var Source: TWvdSServerModeSource; begin Source := TWvdSServerModeSource.Create; Source.KeyExpression := 'Id'; Source.OnFetch := @HandleFetch; DataGrid.ItemsSource := Source; end; procedure HandleFetch(Sender: TObject; Args: TFetchEventArgs); begin Args.Result := QueryDatabase(Args.Skip, Args.Take, Args.SortInfo); end; ---- ===== See Also ===== * [[.:control-bibliothek|Control Library]] * [[.:api-controls-editors|Editor Controls API]] * [[.:api-controls-charts|Charts API]]