Vcl.DBGrids.TCustomDBGrid.ShowPopupEditor

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ShowPopupEditor(Column: TColumn; X: Integer = Low(Integer);
Y: Integer = Low(Integer)); dynamic;

C++

DYNAMIC void __fastcall ShowPopupEditor(TColumn* Column, int X = 0x80000000, int Y = 0x80000000);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

Displays the nested dataset associated with Column in a new window.

Call ShowPopupEditor to display a nested dataset or ADT in a new grid in a new window. Column is the column that is representing the dataset or reference field of the dataset.

For example, if the seventh column in the grid represents a dataset field, the following code displays the dataset associated with that field for the current record.



DBGrid1.ShowPopupEditor(DBGrid1.Columns[7]);



DBGrid1->ShowPopupEditor(DBGrid1->Columns->Items[7]);



ShowPopupEditor expects the TColumn object field type passed to be ftDataSet.

When the ellipsis button in the grid cell of a nested dataset or reference field is clicked, EditButtonClick is called. If the grid's OnEditButtonClick event has an event handler, that event is fired and ShowPopupEditor is not called. If the event handler is not assigned, ShowPopupEditor is called.

The X and Y parameters are screen coordinates to position the popup editor form. The default behavior is to position the form below the cell in the grid.

See Also