Putting a Button in a Column

From RAD Studio
Jump to: navigation, search

Go Up to Creating a Customized Grid


A column can display an ellipsis button (...) to the right of the normal cell editor. Ctrl+Enter or a mouse click fires the DBGrids.OnEditButtonClick event of the grid. You can use the ellipsis button to bring up forms containing more detailed views of the data in the column. For example, in a table that displays summaries of invoices, you could set up an ellipsis button in the invoice total column to bring up a form that displays the items in that invoice, or the tax calculation method, and so on. For graphic fields, you could use the ellipsis button to bring up a form that displays an image.

To create an ellipsis button in a column

  1. Select the column in the Columns list box.
  2. Set ButtonStyle to cbsEllipsis.
  3. Write an OnEditButtonClick event handler.

See Also