View and edit data in the Grid View mode

Data Viewer lets you view and edit data directly in the grid, like in an Excel spreadsheet.

Retrieve data for viewing

  • On the SQL toolbar, click Results as Grid before executing a query that returns data.
  • Execute the query to return the data.

View data

Results output patterns

There are two patterns for the results output: Paginal mode and Infinite scrolling.

The Paginal mode splits data into pages and is used to display data with a large number of records.

By default, the paginal mode displays 1,000 records per page. If your query returns more than 1,000 records and you want to view them all on a single page, you can set a custom number of records either in the Data Editor or the Options window.

From the Data Editor

On the Data Editor toolbar, enter a number of records larger than the expected one.

Set a custom number of records in the Data Editor

From the Options window

1. On the ribbon, select Tools > Options.

2. In the window that opens, navigate to Data Editor > General and specify the value in the Initial page size field.

3. To save the changes, click OK.

Set a custom number of records in the Options window

The infinite scrolling pattern is activated when the paginal mode is off. The pattern loads data continuously as the user scrolls down the page, allowing all data to be retrieved at once.

If a table contains more than 1000 records and the paginal mode is off, the tool can return 302+ records after the SELECT statement execution. It means that the first 302 records are read in the finishing mode, and the + sign means that there are more to load. To see the rest of the data, scroll the data in the grid or press Ctrl + End.

Manipulate the results output

You can use data management options from the shortcut menu. Right-click the column header and select the required option:

  • Sort Ascending or Sort Descending to sort the column in an ascending or descending order, respectively.
  • Group By This Column to group data by the current column and automatically display it as collapsable groups.
  • Show/Hide Group By Box to display or hide the group data by the current column.
  • Hide this Column to hide the column from the Server Profile document.
  • Visible Columns to hide or show column data in the SQL document.
  • Best Fit to adjust the column width to the column content.
  • Best Fit (all columns) to adjust the widths of all columns simultaneously. Note that this operation can take some time if there are many records in the grid.
  • Filter Editor to open the Filter Editor window to set filter criteria.

Viewing data - shortcut menu

To change the column order and width and group them by order, drag column headers to the required area. Additionally, you can fit the column width to the column content by right-clicking the required header and selecting Best Fit on the shortcut menu. To adjust the widths of all columns at once, select Best Fit (all columns). Note that this operation can take some time if there are many records in the grid.

You can set the background and foreground colors for the grid rows. This can be done separately for odd and even rows, focused rows, selected rows, focused cells, or group rows.

Data rows can be viewed, edited, and printed as cards. To learn more, refer to Viewing and editing data in the Card View mode.

Refresh data

To refresh data, select Refresh on the Data menu (for the data view), the shortcut menu, or the toolbar. To abort an overly long refresh operation, select Stop Refresh on the Data menu (for the data view) or on the toolbar.

If the query text has been edited, and changes have been applied, run the Execute command anew instead of refreshing the gird to get updated data.

View and edit data in Data Viewer

You can view and edit data in the built-in Data Viewer. To do this, right-click the required cell and select Data Viewer on the shortcut menu. Alternatively, use the CTRL+W, R key combination.

Data Viewer

The Data Viewer toolbar has the following options:

Data Viewer toolbar

Save Data Save Data (Ctrl+S) allows saving data to a file.

Copy Copy (Ctrl+C) allows copying data to the clipboard.

The following controls allow viewing data in multiple formats:

Hexadecimal View Hexadecimal View (Ctrl+1)

Text View Text View (Ctrl+2)

XML View XML View (Ctrl+3)

HTML View HTML View (Ctrl+4)

Web View Web View (Ctrl+5)

Rich Text View Rich Text View (Ctrl+6)

PDF View PDF View (Ctrl+7)

JSON View JSON View (Ctrl+8)

Image View Image View (Ctrl+9)

Spatial View - Geometry Spatial View - Geometry (Ctrl+Alt+0)

View White Spaces View White Space makes white spaces visible.

Word Wrap Word Wrap adjusts the display of long text within cells or columns. When it is activated, the text automatically wraps onto the next line, making all the content visible within the cell’s width.

Edit data in Data Editor

When the tool executes a statement returning a result set, the retrieved data is displayed in the same SQL document in Data Editor.

The Data Editor toolbar has the following options:

Data Editor toolbar

Refresh data Refresh and Stop Refresh let you refresh and stop refreshing data in the grid, repectively.

Cached Updates Mode Cached Updates Mode allows you to apply data updates in a single batch, thus emulating a separate transaction. If this mode is activated, your data changes will be stored locally on the client side until you click Apply Changes. If there is no need for the changes to be applied, click Cancel Changes. If you close a document with Cached Updates Mode activated, all the changes made since the latest Apply Changes command will be canceled.

Paginal Mode Paginal Mode allows switching to the paginal mode.

Switching between pages These controls allow to Go to First Page, Go to Previous Page, select the number of records per page, Go to Next Page, and Go to Last Page, respectively.

Grid and Card View modes These controls allow switching between Grid View and Card View.

Show Group by Box Show Group by Box allows grouping data by column.

Auto-search mode Auto-search Mode activates the auto-search mode.

Switching from read-only This menu allows switching from the read-only mode to editing.

Note

Computed columns always remain in the read-only mode and cannot be edited.

The bottom panel of the grid has the following controls:

Records: These controls let you navigate down the grid one record at a time or instantly get to the first or the last record in the grid.

Append and delete: These controls let you append or delete records from the grid.

Apply or cancel changes: These controls let you apply or cancel changes made during editing.

Select data

To select data, use one of the following ways:

  • Move the mouse pointer across the grid holding the left mouse button.

  • Click the first cell of the required data range, press and hold SHIFT, and then select the last cell. A rectangular range of cells will be selected.

  • Use CTRL+A to select all cells in the grid.

Using the CTRL key can include/exclude cells from selection. Any number of rows may be copied and pasted to another application (for example, a spreadsheet). However, when you paste data in the data grid, only the first row will be pasted.

Copy and paste data

To copy the selected data, right-click it and do the following:

  • Select Copy on the shortcut menu or press CTRL+C to copy data.
  • Select Copy With Headers on the shortcut menu or press CTRL+SHIFT+C to copy data with headers.
  • Select Copy Data As on the shortcut menu to Copy Column Names Only or Copy Column Names and Types.

To paste data, select Paste or Paste As New Records on the shortcut menu or press CTRL+V.

Insert and delete data

You can use the shortcut menu or the corresponding options under the grid for insert and delete operations. For example, you can do the following:

  • On the shortcut menu, select Set Value To > Null to insert NULL (instead of an empty string). Alternatively, press CTRL+0.

Note

Use the Set Value To menu to set an empty string, zero, or the current date.

  • On the shortcut menu, select Append to add a new record or click the + sign under the grid.

  • On the shortcut menu, select Delete to delete a record from the grid or click the - sign under the grid. Alternatively, press CTRL+DEL.

Row and cell indicators

You can see special indicators next to the focused cell when working with the grid. These indicators reflect the current editing state.

Focused row The row is focused.

Editing The row is being edited.

Row edited The row has been edited.

Invalid value An invalid value has been entered into a cell. You must enter a valid value or press ESCAPE to cancel changes.