Using VDL tables
<vdl-table>
or <vdl-datagrid>
elements. Both elements are powerful mechanisms that generate tables from a given list of array entities from one or more scenarios.
The <vdl-table>
and <vdl-datagrid>
elements offer different features, and are suited for different use-cases.
A table element inspects the properties of each array entity, discovering their index sets. If all of the index sets match (same type, same length), then a table is generated. However, you can filter individual index sets per entry if you need to include arrays that contain additional indices. It should contain one Table Column, either as a <vdl-datagrid-column>
or a<vdl-table-column>
element for each column you wish the table to include.
Common features of Table and Datagrid
<vdl-datagrid>
and
<vdl-table>
have similar feature sets, including:
- Paginated viewing of table or grid data using the
page-mode
attribute. - Using a UI element to add and remove rows by using the
add-remove-row
attribute. - Index filtering.
- Showing or hiding selection on inactive grids or tables using the
always-show-selection
attribute. - Filterable columns using the
column-filter
attribute. - Customizable cell rendering using the
render
attribute in a column. - Local storage of grid or table data for filtering and sorting.
Advantages of Datagrid
- Datagrid accepts raw data as an alternative to entity data.
- Datagrid performs much better in cases of large datasets or tables with a large number of rows.
- Datagrid defaults to a virtual scrolling mode. Only visible rows are rendered, and rows are rendered as you scroll.
- You can export datagrid table data as a CSV using the
show-export
andexport-filename
attributes. - Columns can be frozen by using the
freeze-columns
attribute of<vdl-datagrid>
. - The height of the rendered area can be adjusted by using the
height
attribute. - Datagrid columns can specify a built-in calculation at the foot of the column by using the
bottom-calc
attribute. The potential options are average, max, min, sum, concat, or count. Custom functions can also be provided as a dynamic expression. - The direction that the column data is sorted in can be controlled with
sort-direction
. - The order in which the columns are sorted can be controlled with
sort-order
. - The
vdl-datagrid-index-filter
attribute provides server-side index filtering. Used within avdl-datagrid-column
element it accepts a single value and filters the specified index set for the array entity associated with that column. Used within thevdl-datagrid
element it can accept one or more values and will filter the specified index set for all arrays in the table.
Advantages of Table
- Table navigation using the keyboard.
- Clipboard copy and paste features that are compatible with Microsoft Excel.
- VDL Tables can show a global filter that can be applied across all table data using the
show-filter
attribute. - Adjusting the table configuration by using the
modifier
attribute.
© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.