Inhaltsverzeichnis
API: Podatkovni kontrolniki
API-referenca za podatkovne poglede in mreže.
TWvdSDataGrid
Zmogljiva podatkovna mreža.
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>
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| ItemsSource | IEnumerable | nil | Vir podatkov |
|---|---|---|---|
| SelectedItem | TObject | nil | Izbrana vrstica |
| SelectedItems | IList | nil | Več izbranih |
| Columns | TWvdSColumnCollection | nil | Definicija stolpcev |
| AutoGenerateColumns | Boolean | True | Samodejni stolpci |
| CanUserSort | Boolean | True | Razvrščanje dovoljeno |
| CanUserFilter | Boolean | True | Filtriranje dovoljeno |
| CanUserGroup | Boolean | False | Združevanje dovoljeno |
| CanUserReorderColumns | Boolean | True | Prerazporejanje stolpcev |
| CanUserResizeColumns | Boolean | True | Spreminjanje velikosti stolpcev |
| SelectionMode | TWvdSSelectionMode | smSingle | Single, Multiple, Extended |
| RowHeight | Integer | 25 | Višina vrstice |
| AlternatingRowBackground | TWvdSBrush | nil | Izmenična barva vrstic |
Tipi stolpcev
| Tip | Opis |
| TextColumn | Besedilni stolpec |
|---|---|
| NumberColumn | Številski stolpec s formatom |
| DateColumn | Datumski stolpec |
| CheckBoxColumn | Boolean stolpec |
| ComboBoxColumn | Spustni stolpec |
| TemplateColumn | Uporabniško definiran stolpec |
Dogodki
| Dogodek | Podpis | Opis |
| OnSelectionChanged | TSelectionChangedEvent | Izbira spremenjena |
|---|---|---|
| OnCellClick | TCellClickEvent | Celica kliknjena |
| OnRowDoubleClick | TRowEvent | Dvojni klik na vrstico |
| OnSortChanged | TSortEvent | Razvrščanje spremenjeno |
TUI-opomba
V TUI-targetu se uporablja virtualizacija. Samo vidne vrstice se izrisujejo.
TWvdSTreeList
Hierarhični drevesni pogled s stolpci.
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>
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| ItemsSource | IEnumerable | nil | Korenski podatki |
|---|---|---|---|
| ChildrenPath | string | 'Children' | Pot do otrok |
| SelectedNode | TObject | nil | Izbrano vozlišče |
| ExpandedNodes | IList | nil | Razširjena vozlišča |
| Columns | TWvdSColumnCollection | nil | Stolpci |
| ShowLines | Boolean | True | Povezovalne črte |
| ShowRootLines | Boolean | True | Korenske črte |
Dogodki
| Dogodek | Podpis | Opis |
| OnNodeExpanding | TNodeEvent | Vozlišče se razširja |
|---|---|---|
| OnNodeCollapsing | TNodeEvent | Vozlišče se zloži |
| OnSelectedNodeChanged | TNodeEvent | Izbira spremenjena |
TWvdSCardView
Kartični podatkovni pogled.
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>
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| ItemsSource | IEnumerable | nil | Vir podatkov |
|---|---|---|---|
| CardTemplate | TWvdSDataTemplate | nil | Predloga kartice |
| CardWidth | Integer | 200 | Širina kartice |
| CardHeight | Integer | 150 | Višina kartice |
| Orientation | TWvdSOrientation | oHorizontal | Razporeditev |
TWvdSPivotGrid
Pivot tabela za analizo podatkov.
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>
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| DataSource | IEnumerable | nil | Vir podatkov |
|---|---|---|---|
| RowFields | TPivotFieldCollection | nil | Vrstična polja |
| ColumnFields | TPivotFieldCollection | nil | Stolpčna polja |
| DataFields | TPivotFieldCollection | nil | Podatkovna polja |
| FilterFields | TPivotFieldCollection | nil | Filtrirna polja |
TWvdSVerticalGrid
Navpična mreža lastnosti.
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>
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| SelectedObject | TObject | nil | Urejani objekt |
|---|---|---|---|
| Rows | TVerticalGridRowCollection | nil | Definicija vrstic |
| CategoryMode | Boolean | False | Prikaži kategorije |
TWvdSBandedGridView
Mreža s pasovi stolpcev.
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
Pogled z obrazčno razporeditvijo.
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
Pogled podoben Windows Explorerju.
Namespace
WvdS.UI.Controls.Data
PXAML
<DataGrid ItemsSource="{Binding Files}" ViewType="WinExplorer" ThumbnailField="Icon" TextField="Name" DescriptionField="Modified" />
Lastnosti
| Lastnost | Tip | Privzeto | Opis |
| ViewMode | TWvdSExplorerViewMode | evmList | ExtraLargeIcons, LargeIcons, MediumIcons, SmallIcons, List, Details, Tiles, Content |
|---|---|---|---|
| ThumbnailField | string | | Polje za sličico |
^ TextField | string | | Polje za besedilo |
TWvdSTileView
Ploščični pogled za podatke.
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
Strežniški vir podatkov za velike količine podatkov.
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;
Glejte tudi
Zuletzt geändert: dne 29.01.2026 ob 22:25