Inhaltsverzeichnis
API: Data Controls
Riferimento API per viste dati e grid.
TWvdSDataGrid
Griglia dati potente.
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 | Tipo | Default | Descrizione |
| ItemsSource | IEnumerable | nil | Sorgente dati |
|---|---|---|---|
| SelectedItem | TObject | nil | Riga selezionata |
| SelectedItems | IList | nil | Selezione multipla |
| Columns | TWvdSColumnCollection | nil | Definizione colonne |
| AutoGenerateColumns | Boolean | True | Colonne automatiche |
| CanUserSort | Boolean | True | Ordinamento permesso |
| CanUserFilter | Boolean | True | Filtro permesso |
| CanUserGroup | Boolean | False | Raggruppamento permesso |
| CanUserReorderColumns | Boolean | True | Spostamento colonne |
| CanUserResizeColumns | Boolean | True | Ridimensionamento colonne |
| SelectionMode | TWvdSSelectionMode | smSingle | Single, Multiple, Extended |
| RowHeight | Integer | 25 | Altezza riga |
| AlternatingRowBackground | TWvdSBrush | nil | Colore righe alternate |
Tipi Colonna
| Tipo | Descrizione |
| TextColumn | Colonna testo |
|---|---|
| NumberColumn | Colonna numerica con formato |
| DateColumn | Colonna data |
| CheckBoxColumn | Colonna booleana |
| ComboBoxColumn | Colonna dropdown |
| TemplateColumn | Colonna personalizzata |
Events
| Event | Firma | Descrizione |
| OnSelectionChanged | TSelectionChangedEvent | Selezione modificata |
|---|---|---|
| OnCellClick | TCellClickEvent | Cella cliccata |
| OnRowDoubleClick | TRowEvent | Doppio click su riga |
| OnSortChanged | TSortEvent | Ordinamento modificato |
Nota TUI
Nel target TUI viene usata la virtualizzazione. Solo le righe visibili vengono renderizzate.
TWvdSTreeList
Vista ad albero gerarchica con colonne.
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 | Tipo | Default | Descrizione |
| ItemsSource | IEnumerable | nil | Dati radice |
|---|---|---|---|
| ChildrenPath | string | 'Children' | Percorso figli |
| SelectedNode | TObject | nil | Nodo selezionato |
| ExpandedNodes | IList | nil | Nodi espansi |
| Columns | TWvdSColumnCollection | nil | Colonne |
| ShowLines | Boolean | True | Linee connessione |
| ShowRootLines | Boolean | True | Linee radice |
Events
| Event | Firma | Descrizione |
| OnNodeExpanding | TNodeEvent | Nodo in espansione |
|---|---|---|
| OnNodeCollapsing | TNodeEvent | Nodo in chiusura |
| OnSelectedNodeChanged | TNodeEvent | Selezione modificata |
TWvdSCardView
Vista dati basata su schede.
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='EUR {0:N2}'}" /> </StackPanel> </CardView.CardTemplate> </CardView>
Properties
| Property | Tipo | Default | Descrizione |
| ItemsSource | IEnumerable | nil | Sorgente dati |
|---|---|---|---|
| CardTemplate | TWvdSDataTemplate | nil | Template scheda |
| CardWidth | Integer | 200 | Larghezza scheda |
| CardHeight | Integer | 150 | Altezza scheda |
| Orientation | TWvdSOrientation | oHorizontal | Disposizione |
TWvdSPivotGrid
Tabella pivot per analisi dati.
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 | Tipo | Default | Descrizione |
| DataSource | IEnumerable | nil | Sorgente dati |
|---|---|---|---|
| RowFields | TPivotFieldCollection | nil | Campi riga |
| ColumnFields | TPivotFieldCollection | nil | Campi colonna |
| DataFields | TPivotFieldCollection | nil | Campi dati |
| FilterFields | TPivotFieldCollection | nil | Campi filtro |
TWvdSVerticalGrid
Property-Grid verticale.
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 | Tipo | Default | Descrizione |
| SelectedObject | TObject | nil | Oggetto modificato |
|---|---|---|---|
| Rows | TVerticalGridRowCollection | nil | Definizione righe |
| CategoryMode | Boolean | False | Mostra categorie |
TWvdSBandedGridView
Griglia con bande colonne.
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
Vista layout form.
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
Vista stile Windows Explorer.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Files}" ViewType="WinExplorer" ThumbnailField="Icon" TextField="Name" DescriptionField="Modified" />
Properties
| Property | Tipo | Default | Descrizione |
| ViewMode | TWvdSExplorerViewMode | evmList | ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, List, Details, Tiles, Content |
|---|---|---|---|
| ThumbnailField | string | | Campo thumbnail |
^ TextField | string | | Campo testo |
TWvdSTileView
Vista tile per dati.
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
Sorgente dati lato server per grandi volumi.
Namespace
WvdS.UI.Controls.Data
Sintassi
TServerModeSource = class property KeyExpression: string; property QueryableSource: IQueryable; procedure Reload; end;
Utilizzo
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;
Vedi anche
Zuletzt geändert: il 29/01/2026 alle 22:36