comp • gb.db.form • dataview

DataView (gb.db.form)

This control implements a TableView that shows the contents of a database table and allows to edit it.

The data is provided by the the first DataSource parent control.

The Columns property controls the list of fields to display or edit.

If you want more control on the appearance, you can use the View property to access the inner TableView control.

This class inherits UserControl in gb.qt5.
This class is
Create a new DataView control.
creatable
.

Properties

Methods Events
Action  
Returns or sets the background color used by the control.
Background  
Return or set if the control has a border.
Border  
Children   ClientH   ClientHeight   ClientW   ClientWidth   ClientX   ClientY  
Return or set the fields displayed by the control.
Columns  
Return the number of records.
Count  
Return the values of all primary keys of the current record as an array of Variant.
Current  
Cursor  
Use this property to store the contents of a cell during the Data event handler.
Data  
Design   Drop  
Return or set if the DataView contents is editable.
Editable  
Enabled   Expand  
Returns or sets the font used to draw text in the control.
Font  
Foreground  
Returns or sets if grid lines should be displayed.
Grid  
H   Handle   HasFocus  
Return or set which headers should be displayed:
Header  
Height  
Return or set if even lines are highlighted.
Highlight  
Hovered   Id   Ignore  
Return the index of the current record.
Index  
Return or set the labels that will replace the field names in the column headers.
Labels  
Left  
Return or set the selection mode:
Mode  
Mouse   Name   Next   NoTabFocus   Parent   PopupMenu   Previous   Proxy   ScreenX   ScreenY  
Return or set if the control can be sorted by clicking on the column headers.
Sorted  
Tag   Tooltip   Top   Tracking  
Return the underlying TableView used for displaying and editing the data.
View  
Visible   W   Width   Window   X   Y  
Cancel the current record edition.
Cancel  
Enter creation mode.
Create  
Delete   Drag   FindChild   Grab   Hide   Lower   Move  
Move the current record to the first one.
MoveFirst  
Move the current record to the last one.
MoveLast  
Move the current record to the next one.
MoveNext  
Move the current record to the previous one.
MovePrevious  
MoveScaled  
Move the current record to the Indexth one.
MoveTo  
Raise   Refresh  
Delete the selected records, and return TRUE if is has not been possible.
Remove  
Reparent   Resize   ResizeScaled  
Save the current record and return TRUE if it has not been possible.
Save  
Select all rows.
SelectAll  
SetFocus   Show  
Unselect all rows.
UnselectAll  
Reload the DataView contents.
Update  
Raised when the current record changes.
Activate  
Arrange   BeforeArrange  
Raised when the DataView needs to display a specific cell.
Data  
DblClick   Drag   DragLeave   DragMove   Drop   Enter   GotFocus   KeyPress   KeyRelease   Leave   LostFocus   Menu   MouseDown   MouseDrag   MouseMove   MouseUp   MouseWheel   NewChild  

See also