Please wait...

Float columns

Video versionA video overview of string column in wpDataTables

Float columns in wpDataTablesFloat column type and when to use it

“Float” column type should be used when you need to render numeric values with a decimal part. Even non-float content type from the input will be casted as a number, and render with the amount of numbers after the comma that was defined in the “wpDataTables settings page“.

  • Rendering rules: value is casted as a number, and rendered with number of decimal places, that you defined, after the comma.
  • Sorting rules: arithmetical.
  • Applicable filter types: text (will also work), number, number range, selectbox, checkbox.
  • Issues to note: none.

ExampleA sample table using Float columns

Yearly revenue” column in this table is a Float type column.

wdt_ID Company name Sector Yearly revenue Client since
1 Black Turtle Architecture 10,000,000.00 29/05/2011
2 Clockwork Orange Business Consulting 3,000,000.00 01/05/2003
3 Theodore Consulting Technology 11,000,000.00 17/05/2004
4 White Wing Industries Business Consulting 1,250,000.00 18/05/2006
5 Twinkles Inc. IT 8,000,000.00 01/05/2006
6 The Large Company Construction 7,000,000.00 01/06/2015
7 Non-Standard Production Construction 3,900,000.00 05/06/2007
8 Jailbreak Machinery IT 27,500,000.00 01/06/2001
9 Infinite Scroll Maniacs IT 20,000,000.00 28/05/1996
10 Thebest Construction Agency Construction 90,000,000.00 01/05/1996
wdt_ID Company name Sector Yearly revenue Client since
∑ = 181,650,000.00
Avg = 18,165,000.00
Min = 1,250,000.00
Max = 90,000,000.00

Float column settingsHow to configure float columns

There are a few interesting features, for “Float” column type, that are different from other column types.

From version 2.0 you can set “Decimal places” per individual column that represents number of digits to the right of a decimal point. If you leave this field blank, column will take number of decimal places that is defined on the “wpDataTables settings page.

Also there are four calculation features that you can enable for “Float” 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 “Calculation functions chapter of this documentation for detailed info.

Never miss new features!

Join 2000+ newsletter subscribers

Never miss notifications about new cool features, promotions, giveaways or freebies - subscribe to our newsletter! We send about one mail per month, and do our best to keep our announcements interesting.

We never spam or disclose your address to anyone.