Integer columns

Video versionA video overview of integer column in wpDataTables

Integer columns in wpDataTablesInteger column types and when to use it

“Integer” columns are used when you need to render numeric values that do not contain a decimal. Even, if in the input data source you have non-integer values for this column (not just numbers, or numbers with a decimal), if you define a column as integer, it will cast and render all the values as integers, cut all non-numerical characters, and the decimals as well.

  • Rendering rules: none, value is casted as a number as rendered with formatting rule applied (formatting rule can be chosen in the settings page).
  • Sorting rules: arithmetical.
  • Applicable filter types: text (will also work), number, number range,number range slider, select-box, multi select-box, and checkbox.
  • Issues to note: none.

ExampleA sample table using Integer columns

Star” and “Price” columns in this table are integer columns.

Integer column settingsHow to configure integer columns

Integer column options

If you don’t need the formatting for the column (for example, if it represents a year, a product SKU, a vendor code, etc.) just tick the “Skip thousands separator” checkbox in the column settings panel.

There are also four calculation features you can enable for “Integer” columns. You can tick these checkboxes to calculate desired functions (Sum, Average, Minimum, Maximum) for all values for a given column. These calculations will be rendered in the table footer, as you can see in the example above. See the “Calculation functions chapter of this documentation for detailed info.