Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 4.2

E35125-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
PDF · Mobi · ePub

5.6 About Adding Data Grids

Data grids are sets of data displayed in rows and columns. Data grids store data in a similar way to how spreadsheets store data. Once created, the structure can be modified as needed over time.

Topics:

5.6.1 About Data Grids

You can define the structure of a data grid using column names, data sources, and basic validations, or you can create a data grid by pasting spreadsheet data. Once created, the structure can be modified as needed.

Users can alter the layout of report data by selecting columns or by applying filters, highlighting, and sorting. Users can also define breaks, aggregations, group bys, computations, and different charts. Additionally, users can create multiple variations of a data grid and save them as named reports, for either public or private viewing. You can also use the data from a data grid and include it as a chart or report within any page.

5.6.2 Creating a Data Grid

You can create a data grid by either defining the structure (that is, the column names, data types, and basic validations), or by pasting in spreadsheet data. In addition to the defined columns, the following standard columns are always included within each data grid: owner, created by, created on, updated by, updated on, row order, and annotation (files, notes, links, and tags).

Topics:

5.6.2.1 Creating a Data Grid from Scratch

When you create a data grid from scratch you must define the column names, datatypes, and basic values. Once you have created the basic structure, you can then populate it with data.

To create a data grid from scratch:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select New Data Grid.

    Tip:

    You can also select New Data Grid on the Control Panel.
  3. When prompted for the section type, select From Scratch and click Next.

    Description of data_grid_srcatch.gif follows
    Description of the illustration data_grid_srcatch.gif

  4. Specify the following:

    1. Name - Enter a data grid name.

    2. Alias - Enter a data grid alias. Use this alias to link to this data grid within other page sections. A data grid alias must be unique within an application.

    3. Define the data grid structure by specifying the column name and data type. To change the order, click the Up and Down arrows under Move.

      To add more columns, click Add Column.

    4. Click Create Data Grid.

    The data grid appears.

  5. To add data, click Add Row. See "Editing Data Grid Data".

5.6.2.2 Creating a Data Grid by Copying and Pasting Spreadsheet Data

To create a data grid by copying and pasting spreadsheet data:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select New Data Grid.

    Tip:

    You can also select New Data Grid from the Create menu or the Control Panel.
  3. When prompted for the section type, select Copy and Paste and click Next.

  4. Specify the following:

    1. Name - Enter a data grid name.

    2. Alias - Enter a data grid alias. You can use this alias to link to this data grid within page sections. A data grid alias must be unique within an application.

    3. First Row Contains Column Headings - Select this option if applicable.

    4. Paste Spreadsheet Data - Copy and paste the data you want to load from a spreadsheet program.

    5. Click Upload.

    A data grid appears.

5.6.3 Copying a Data Grid

To copy a data grid:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select an existing data grid.

    The data grid appears.

  3. Click Manage and select Copy.

  4. Enter a new data grid name and click Copy.

5.6.4 Viewing and Editing a Data Grid

Once you create a data grid, you can view and edit it on the Data page.

Topics:

Tip:

Data grids display as an interactive report. To learn more about interactive reports and using the Actions menu, see "Customizing Interactive Reports" and "About the Actions Menu".

5.6.4.1 Accessing the Data Page

To access the Data page:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select View All.

    An interactive report appears displaying all data grids.

    Tip:

    If icons display, click the View Report icon.

    The Report view appears.

    Description of data_page_rpt.gif follows
    Description of the illustration data_page_rpt.gif

    By default, Report view displays the data grid Name, Embed Tag, Alias, Status, Updated, and Updated By columns. The Embed Tag column displays the syntax used to include a link to the report or data grid from within a section of a page.

  3. Select a data grid.

    The data grid appears.

    Description of data_grid_view.gif follows
    Description of the illustration data_grid_view.gif

5.6.4.1.1 Toggling Check Boxes

When viewing a data grid, you can enable and disable check boxes. From the Manage menu, select Toggle Check Boxes. Selecting this option, displays check boxes to the left of each row.

Description of data_grid_toggle.gif follows
Description of the illustration data_grid_toggle.gif

5.6.4.2 Editing Data Grid Data

To edit data grid data:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. To add another row:

    1. Click the Add Row button.

      A form appears.

    2. Edit the fields provided and click either Save or Save and Add Another.

5.6.4.3 Editing Data Grid Columns Manually

To manually edit data grid columns:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. From the Manage Menu, select Columns.

    Description of data_grid_col.gif follows
    Description of the illustration data_grid_col.gif

    The following submenu displays:

    • Add - Adds a new column. Enables you to define all column properties such as the column name, type, whether a value is required, list of values, default type, and default text.

    • Column Properties - Editable properties include sequence, group, required value, label, format, heading, width and height, column type, default text, list of values, and help text.

    • List of Values - Enables you to restrict the values a user can enter. You associate a list of values with a column on Column Properties.

    • Column Groups - Create a group and add columns to the group. Add / Edit row page displays groups as a subsection under the Data region and lists columns within the group. By using groups, you can control the Add / Edit row page display.

    • Validation - Create a column validation and error message.

    • Delete Columns - Select columns to be deleted.

  4. Select a submenu option and follow the on-screen instructions.

5.6.4.4 Editing Data Grid Rows Manually

You can manually edit the rows of a data grid by selecting Rows and on the Manage menu.

To manually edit data grid rows:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. From the Manage Menu, select Rows.

    Description of data_grid_row.gif follows
    Description of the illustration data_grid_row.gif

    The following options display:

    • Add row - Adds a new row.

    • Set Column Values - Set a predefined value for a column.

    • Replace - Search and replace rows.

    • Fill - Fill down null column values with column value from above cell.

    • Delete Rows - Select rows to be deleted.

  4. Select a submenu option and follow the on-screen instructions.

5.6.4.5 Editing a Single Data Grid Row

To manually edit a single data grid row:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. Locate the row to be edited and click the Edit Row icon.

    Description of data_grid_edit_row.gif follows
    Description of the illustration data_grid_edit_row.gif

    The Add/Edit Row page appears.

  4. Edit the appropriate rows and click Apply Changes.

Tip:

You can use the Actions region on the Add/Edit Row page to add a new row, add annotations, view a history of changes, edit column properties and group, delete columns, and create a list of values or a validation.

5.6.4.5.1 Adding Annotations to a Single Data Grid Row

To add annotations (that is, files, notes, links, and tags) to a single data grid row:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. Locate the row to be edited and click the Edit Row icon.

    The Add/Edit Row page appears.

    Description of data_grid_annot.gif follows
    Description of the illustration data_grid_annot.gif

  4. On the Actions region, select one of the following:

    • Add File

    • Add Note

    • Add Link

    • Add Tags

  5. Follow the on-screen instructions.

5.6.4.5.2 Displaying Annotation Columns in a Data Grid Report

To display annotation columns in a data grid report:

  1. Add annotations to the data grid report as described in "Adding Annotations to a Single Data Grid Row".

  2. To include the columns in the data grid report:

    1. View the data grid report.

    2. Click the Actions menu and then Select Columns.

    3. In the Select Columns region, move the columns (for example, Files, Notes, Links, and Tags) to Display in Report.

    4. Click Apply.

  3. To ensure all users can see the columns, developers can save the revised layout as the default report:

    1. Click the Actions menu and select Save Report.

      The Save Report Region appears.

    2. In Save Report:

      1. Save - Select As Default Report Settings.

      2. Name - Enter a name for the report.

      3. Description - Enter an optional description.

      4. Click Apply.

5.6.4.6 Editing Data Grid Properties

You can change the name, alias, and description of a data grid on the Data Grid Properties page.

To edit a data grid:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. From the Manage menu, click Properties.

    The Data Grid Properties page appears.

  4. Edit the fields provided and click Apply.

5.6.4.7 Creating a Bookmark Link to a Data Grid

To bookmark directly to a data grid or a row, use the following syntax:

ws?p=100000:DG_<data grid alias> 
ws?p=100000:DG_<data grid alias>:<session ID>:ROW_ID:<data grid row ID>

The data grid row ID is an ID column value of the APEX$_WS_ROWS table.

To get a link to a specific data grid row:

  1. Run the data grid.

  2. Click the Edit Row icon.

  3. Note the URL in the browser.

5.6.5 Viewing the Data Grid Change History Log

The View Change History log displays a report of data grid changes. This report lists the row, column name, old value, new value, user who authored the change, and how long ago the change occurred.

To view a history of data grid changes:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. From the Manage menu, select History.

5.6.6 Deleting a Data Grid

To copy a data grid:

  1. Run the Websheet application. See "Running a Websheet".

  2. From the Data Grid menu, select a data grid.

    The data grid appears.

  3. From the Manage menu, select Delete Data Grid.

  4. Confirm your selection and click Delete.