====== API: Data Controls ====== API-referenca za prikaze podataka i gridove. ===== TWvdSDataGrid ===== Moćni data-grid. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ ItemsSource | IEnumerable | nil | Izvor podataka | ^ SelectedItem | TObject | nil | Odabrani redak | ^ SelectedItems | IList | nil | Višestruki odabir | ^ Columns | TWvdSColumnCollection | nil | Definicija stupaca | ^ AutoGenerateColumns | Boolean | True | Auto-stupci | ^ CanUserSort | Boolean | True | Sortiranje dopušteno | ^ CanUserFilter | Boolean | True | Filtriranje dopušteno | ^ CanUserGroup | Boolean | False | Grupiranje dopušteno | ^ CanUserReorderColumns | Boolean | True | Premještanje stupaca | ^ CanUserResizeColumns | Boolean | True | Promjena veličine stupaca | ^ SelectionMode | TWvdSSelectionMode | smSingle | Single, Multiple, Extended | ^ RowHeight | Integer | 25 | Visina retka | ^ AlternatingRowBackground | TWvdSBrush | nil | Alternativna boja retka | ==== Tipovi stupaca ==== | Tip | Opis | ^ TextColumn | Tekstualni stupac | ^ NumberColumn | Numerički stupac s formatom | ^ DateColumn | Datumski stupac | ^ CheckBoxColumn | Boolean-stupac | ^ ComboBoxColumn | Dropdown-stupac | ^ TemplateColumn | Prilagođeni stupac | ==== Events ==== | Event | Signatura | Opis | ^ OnSelectionChanged | TSelectionChangedEvent | Odabir promijenjen | ^ OnCellClick | TCellClickEvent | Ćelija kliknuta | ^ OnRowDoubleClick | TRowEvent | Dvostruki klik na redak | ^ OnSortChanged | TSortEvent | Sortiranje promijenjeno | ==== TUI-napomena ==== U TUI-targetu koristi se virtualizacija. Samo vidljivi reci se renderiraju. ---- ===== TWvdSTreeList ===== Hijerarhijski prikaz stabla sa stupcima. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ ItemsSource | IEnumerable | nil | Root-podaci | ^ ChildrenPath | string | 'Children' | Putanja do djece | ^ SelectedNode | TObject | nil | Odabrani čvor | ^ ExpandedNodes | IList | nil | Prošireni čvorovi | ^ Columns | TWvdSColumnCollection | nil | Stupci | ^ ShowLines | Boolean | True | Linije povezivanja | ^ ShowRootLines | Boolean | True | Root-linije | ==== Events ==== | Event | Signatura | Opis | ^ OnNodeExpanding | TNodeEvent | Čvor se proširuje | ^ OnNodeCollapsing | TNodeEvent | Čvor se sužava | ^ OnSelectedNodeChanged | TNodeEvent | Odabir promijenjen | ---- ===== TWvdSCardView ===== Kartični prikaz podataka. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ ItemsSource | IEnumerable | nil | Izvor podataka | ^ CardTemplate | TWvdSDataTemplate | nil | Predložak kartice | ^ CardWidth | Integer | 200 | Širina kartice | ^ CardHeight | Integer | 150 | Visina kartice | ^ Orientation | TWvdSOrientation | oHorizontal | Raspored | ---- ===== TWvdSPivotGrid ===== Pivot-tablica za analizu podataka. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ DataSource | IEnumerable | nil | Izvor podataka | ^ RowFields | TPivotFieldCollection | nil | Polja redaka | ^ ColumnFields | TPivotFieldCollection | nil | Polja stupaca | ^ DataFields | TPivotFieldCollection | nil | Polja podataka | ^ FilterFields | TPivotFieldCollection | nil | Polja filtra | ---- ===== TWvdSVerticalGrid ===== Vertikalni property-grid. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ SelectedObject | TObject | nil | Objekt za uređivanje | ^ Rows | TVerticalGridRowCollection | nil | Definicija redaka | ^ CategoryMode | Boolean | False | Prikaži kategorije | ---- ===== TWvdSBandedGridView ===== Grid s grupiranim stupcima. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSLayoutView ===== Formular-layout prikaz. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSWinExplorerView ===== Windows Explorer-nalik prikaz. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ==== Properties ==== | Property | Tip | Default | Opis | ^ ViewMode | TWvdSExplorerViewMode | evmList | ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, List, Details, Tiles, Content | ^ ThumbnailField | string | '' | Polje za thumbnail | ^ TextField | string | '' | Polje za tekst | ---- ===== TWvdSTileView ===== Pločice-prikaz za podatke. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== PXAML ==== ---- ===== TWvdSServerModeSource ===== Server-strana podatkovna izvor za velike skupove podataka. ==== Namespace ==== ''WvdS.UI.Controls.Data'' ==== Sintaksa ==== TServerModeSource = class property KeyExpression: string; property QueryableSource: IQueryable; procedure Reload; end; ==== Uporaba ==== 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; ---- ===== Vidi također ===== * [[.:control-bibliothek|Biblioteka kontrola]] * [[.:api-controls-editors|Editor Controls API]] * [[.:api-controls-charts|Charts API]]