[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomStringGrid.SelectionSetHTML

Sets the value for the current Selection to the specified HTML content.

## Declaration

Source position: grids.pas line 1793

`protected procedure TCustomStringGrid.SelectionSetHTML(`
`TheHTML: string;`
`TheText: string`
`);`

## Arguments

`TheHTML` |  | HTML stored in the current selection.
`TheText` |  | Textual representation for the HTML content.

## Description

Extracts text for rows and columns in the grid from the HTML-tagged content in TheHTML. Recognizes and converts the following HTML tags:

- BR
- TR
- TD

Converts HTML numeric character entities to their UTF-8-encoded character equivalent. Unrecognized character entities are converted to a Question Mark character (?).

Calls DoCellProcess to paste the values extracted from the HTML content. The value in TheText is used when TheHTML does not contain valid HTML that can be handled in the method. Cells affected in the method are assigned as the current Selection in the grid control prior to exit.

Called from the DoPasteFromClipboard method when the clipboard supports the HTML format.