RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.ShowPopupEditor Method

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

Pascal
procedure ShowPopupEditor(Column: TColumn; X: Integer = Low(Integer); Y: Integer = Low(Integer)); dynamic;
C++
__fastcall ShowPopupEditor(TColumn Column, int X = Low(Integer), int Y = Low(Integer));

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!