How To: View and Edit Data

The grid editor allows you to quickly view and edit data right in the grid. You may retrieve data to the grid in the following way:

By executing LINQ, HQL, or ESQL query.
By selecting data from the model entity.
By selecting data from the table or view, displayed in the Database Explorer (only data from the table or view can be edited).
By clicking the Execute button in the Defining Query Editor (the data will be displayed in the Preview Data dialog).

To select data from the model entity, right-click it in the diagram or in the Model Explorer and select Retrieve Data from the popup menu.

To select data from table or view, right-click it in the Database Explorer and select Retrieve Data from the popup menu.

To refresh data, right-click in the grid, and then select Refresh in the popup menu. To sort data quickly in-place, left-click on the header cell.

note Note

You can see the SQL code that returned the data on the SQL tab of the document.

 

ExpandedToggleIcon        Browsing the Data of the Entities by Associations

When you retrieve data from an entity, that have associations, you may view not just the entity data, but also the data from the entities, connected with the current by associations. Each record will have + button in its first cell. Click it to expand tabs with data grids. Each tab corresponds to the entity, that is connected to the current with an association and contains records, that have the same association referential constraint property value as the "expanded" record.

Images_EntityData

You can click the Images_Grid_Magnifier button to expand the tab contents to the whole main grid area. The Images_Grid_Cross button in the upper left corner restores the original layout. Each expanded grid also contains records with the + button, allowing you to browse the associations further.

note Note

In Entity Framework models the complex type property data is also displayed on one of the tabs.

 

ExpandedToggleIcon        Editing Data

To edit data in the cell click on a cell you want to edit. After making any changes to the cell, press ENTER to confirm changes or ESCAPE to cancel. To insert the NULL value (instead of empty string) press the CTRL+0 key combination. To add a new record, click the '+' button under the grid or press the INSERT key. To delete a record from the grid, click the '-' button under the grid or press CTRL+DEL keys. You may also use grid popup menu for insert and delete operations.

note Note

When editing data, retrieved from Database Explorer, you are working directly with the database data.

 

ExpandedToggleIcon        Row and cell indicators

When working with grid, you can see special indicators near to the focused cell. These indicators reflect current editing state.

Images_gi_RowFocused The row is focused.

Images_gi_RowEditing The row is being edited.

Images_gi_RowEdited The row has been edited.

Images_gi_ErrorValue Incorrect value has been entered into a cell. You must either fix the value or press ESCAPE key to cancel changes made to the cell.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.