====== API: Data Controls ====== Riferimento API per viste dati e grid. ===== TWvdSDataGrid ===== Griglia dati potente. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== 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 ==== ==== 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 ==== ==== 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 ==== ==== 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 ==== ==== 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 ==== ---- ===== TWvdSLayoutView ===== Vista layout form. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSWinExplorerView ===== Vista stile Windows Explorer. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== 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 ==== ---- ===== 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 ===== * [[.:control-bibliothek|Libreria Control]] * [[.:api-controls-editors|API Editor Controls]] * [[.:api-controls-charts|API Charts]]