Inhaltsverzeichnis
API: Data Controls
API-Referenz für Datenansichten und Grids.
TWvdSDataGrid
Leistungsstarkes Daten-Grid.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Orders}" SelectedItem="{Binding SelectedOrder}" AutoGenerateColumns="False"> <DataGrid.Columns> <TextColumn Header="Order ID" Binding="{Binding Id}" Width="80" /> <TextColumn Header="Customer" Binding="{Binding CustomerName}" Width="*" /> <DateColumn Header="Date" Binding="{Binding OrderDate}" /> <NumberColumn Header="Total" Binding="{Binding Total}" Format="C2" /> </DataGrid.Columns> </DataGrid>
Properties
| Property | Typ | Default | Beschreibung |
| ItemsSource | IEnumerable | nil | Datenquelle |
|---|---|---|---|
| SelectedItem | TObject | nil | Ausgewählte Zeile |
| SelectedItems | IList | nil | Mehrfachauswahl |
| Columns | TWvdSColumnCollection | nil | Spalten-Definition |
| AutoGenerateColumns | Boolean | True | Auto-Spalten |
| CanUserSort | Boolean | True | Sortierung erlaubt |
| CanUserFilter | Boolean | True | Filter erlaubt |
| CanUserGroup | Boolean | False | Gruppierung erlaubt |
| CanUserReorderColumns | Boolean | True | Spalten verschieben |
| CanUserResizeColumns | Boolean | True | Spalten skalieren |
| SelectionMode | TWvdSSelectionMode | smSingle | Single, Multiple, Extended |
| RowHeight | Integer | 25 | Zeilenhöhe |
| AlternatingRowBackground | TWvdSBrush | nil | Alternierende Zeilenfarbe |
Column-Typen
| Typ | Beschreibung |
| TextColumn | Text-Spalte |
|---|---|
| NumberColumn | Numerische Spalte mit Format |
| DateColumn | Datum-Spalte |
| CheckBoxColumn | Boolean-Spalte |
| ComboBoxColumn | Dropdown-Spalte |
| TemplateColumn | Benutzerdefinierte Spalte |
Events
| Event | Signatur | Beschreibung |
| OnSelectionChanged | TSelectionChangedEvent | Auswahl geändert |
|---|---|---|
| OnCellClick | TCellClickEvent | Zelle geklickt |
| OnRowDoubleClick | TRowEvent | Doppelklick auf Zeile |
| OnSortChanged | TSortEvent | Sortierung geändert |
TUI-Hinweis
Im TUI-Target wird Virtualisierung verwendet. Nur sichtbare Zeilen werden gerendert.
TWvdSTreeList
Hierarchische Baumansicht mit Spalten.
Namespace
WvdS.UI.Controls.Data
PXAML
<TreeList ItemsSource="{Binding Departments}" ChildrenPath="Children" ExpandedNodes="{Binding ExpandedDepts}"> <TreeList.Columns> <TextColumn Header="Name" Binding="{Binding Name}" Width="*" /> <NumberColumn Header="Employees" Binding="{Binding EmployeeCount}" /> </TreeList.Columns> </TreeList>
Properties
| Property | Typ | Default | Beschreibung |
| ItemsSource | IEnumerable | nil | Root-Daten |
|---|---|---|---|
| ChildrenPath | string | 'Children' | Pfad zu Kindern |
| SelectedNode | TObject | nil | Ausgewählter Knoten |
| ExpandedNodes | IList | nil | Expandierte Knoten |
| Columns | TWvdSColumnCollection | nil | Spalten |
| ShowLines | Boolean | True | Verbindungslinien |
| ShowRootLines | Boolean | True | Root-Linien |
Events
| Event | Signatur | Beschreibung |
| OnNodeExpanding | TNodeEvent | Knoten wird expandiert |
|---|---|---|
| OnNodeCollapsing | TNodeEvent | Knoten wird eingeklappt |
| OnSelectedNodeChanged | TNodeEvent | Auswahl geändert |
TWvdSCardView
Kartenbasierte Datenansicht.
Namespace
WvdS.UI.Controls.Data
PXAML
<CardView ItemsSource="{Binding Products}" CardWidth="200" CardHeight="250"> <CardView.CardTemplate> <StackPanel> <Image Source="{Binding ImageUrl}" Height="120" /> <Label Text="{Binding Name}" FontWeight="Bold" /> <Label Text="{Binding Price, StringFormat='€ {0:N2}'}" /> </StackPanel> </CardView.CardTemplate> </CardView>
Properties
| Property | Typ | Default | Beschreibung |
| ItemsSource | IEnumerable | nil | Datenquelle |
|---|---|---|---|
| CardTemplate | TWvdSDataTemplate | nil | Karten-Template |
| CardWidth | Integer | 200 | Kartenbreite |
| CardHeight | Integer | 150 | Kartenhöhe |
| Orientation | TWvdSOrientation | oHorizontal | Anordnung |
TWvdSPivotGrid
Pivot-Tabelle für Datenanalyse.
Namespace
WvdS.UI.Controls.Data
PXAML
<PivotGrid DataSource="{Binding SalesData}"> <PivotGrid.RowFields> <PivotField FieldName="Region" /> <PivotField FieldName="Product" /> </PivotGrid.RowFields> <PivotGrid.ColumnFields> <PivotField FieldName="Year" /> </PivotGrid.ColumnFields> <PivotGrid.DataFields> <PivotField FieldName="Amount" SummaryType="Sum" /> </PivotGrid.DataFields> </PivotGrid>
Properties
| Property | Typ | Default | Beschreibung |
| DataSource | IEnumerable | nil | Datenquelle |
|---|---|---|---|
| RowFields | TPivotFieldCollection | nil | Zeilen-Felder |
| ColumnFields | TPivotFieldCollection | nil | Spalten-Felder |
| DataFields | TPivotFieldCollection | nil | Daten-Felder |
| FilterFields | TPivotFieldCollection | nil | Filter-Felder |
TWvdSVerticalGrid
Vertikales Property-Grid.
Namespace
WvdS.UI.Controls.Data
PXAML
<VerticalGrid SelectedObject="{Binding CurrentItem}"> <VerticalGridRow Caption="Name" FieldName="Name" /> <VerticalGridRow Caption="Description" FieldName="Description" RowType="Memo" /> <VerticalGridRow Caption="Price" FieldName="Price" RowType="SpinEdit" /> </VerticalGrid>
Properties
| Property | Typ | Default | Beschreibung |
| SelectedObject | TObject | nil | Bearbeitetes Objekt |
|---|---|---|---|
| Rows | TVerticalGridRowCollection | nil | Zeilen-Definition |
| CategoryMode | Boolean | False | Kategorien anzeigen |
TWvdSBandedGridView
Grid mit Spalten-Bändern.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Data}" ViewType="Banded"> <DataGrid.Bands> <Band Header="Personal Info"> <TextColumn Header="Name" Binding="{Binding Name}" /> <TextColumn Header="Email" Binding="{Binding Email}" /> </Band> <Band Header="Address"> <TextColumn Header="City" Binding="{Binding City}" /> <TextColumn Header="Country" Binding="{Binding Country}" /> </Band> </DataGrid.Bands> </DataGrid>
TWvdSLayoutView
Formular-Layout-Ansicht.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Contacts}" ViewType="Layout"> <DataGrid.LayoutTemplate> <LayoutGroup> <LayoutItem Caption="Name" FieldName="Name" /> <LayoutItem Caption="Phone" FieldName="Phone" /> <LayoutItem Caption="Notes" FieldName="Notes" RowSpan="2" /> </LayoutGroup> </DataGrid.LayoutTemplate> </DataGrid>
TWvdSWinExplorerView
Windows Explorer-ähnliche Ansicht.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Files}" ViewType="WinExplorer" ThumbnailField="Icon" TextField="Name" DescriptionField="Modified" />
Properties
| Property | Typ | Default | Beschreibung |
| ViewMode | TWvdSExplorerViewMode | evmList | ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, List, Details, Tiles, Content |
|---|---|---|---|
| ThumbnailField | string | | Feld für Thumbnail |
^ TextField | string | | Feld für Text |
TWvdSTileView
Kachel-Ansicht für Daten.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Items}" ViewType="Tile" TileWidth="150" TileHeight="100"> <DataGrid.TileTemplate> <StackPanel> <Label Text="{Binding Title}" FontWeight="Bold" /> <Label Text="{Binding Subtitle}" /> </StackPanel> </DataGrid.TileTemplate> </DataGrid>
TWvdSServerModeSource
Server-seitige Datenquelle für große Datenmengen.
Namespace
WvdS.UI.Controls.Data
Syntax
TServerModeSource = class property KeyExpression: string; property QueryableSource: IQueryable; procedure Reload; end;
Verwendung
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;
Siehe auch
Zuletzt geändert: den 29.01.2026 um 15:13