Blog
On the DataTables blog you will find news, announcements and tutorials about DataTables and its suite of extensions. New posts are published monthly, with additional news items in between.
Search highlighting with mark.js
If you're googling for DataTables or any other keyword you'll notice that the search keyword will be highlighted in the description of each result. This behaviour allows users to find what they're searching for more faster and therefore leads to a better usability.
DataTables itself offers a search feature that filters a table to only show relevant rows. But it doesn't offer built-in keyword highlighting within these results. If you'd like to improve the usability for your users too, keep on reading.
Sorting with absolute positioned data
The ordering of information in a DataTable is probably the aspect that I cover most in this blog (enums and dates for example, and more to come), but that is because it such a rich topic! DataTables is used in a wide range of applications from space telescope telemetry to amateur football leagues, so it needs to be able to cope with lots of different data types. DataTables core ships with just a basic set of data sorting functions (string, number, currency, percentage, ISO8601 dates) so, for anything outside of this range DataTables provides a sorting plug-in API that you can use to define your own sorting methods.
Typically with a sorting method you would have linear ordering, whereby the descending sort is the exact reverse of ascending, and everything is ordered by a simple comparison (numeric or character code points). This post is going to be a little different: I'll introduce a non-linear configurable sorting plug-in, whereby you can keep specific pieces of data at the top or the bottom of a column, regardless of the sorting direction and the value of that item.
An example is always worth a million words, so let's consider the following table:
| Name | Position | Office | Start date | Salary |
|---|---|---|---|---|
| Tiger Nixon | System Architect | Edinburgh | 2011/04/25 | $320,800 |
| Garrett Winters | Accountant | Tokyo | 2011/07/25 | $170,750 |
| Ashton Cox | Junior Technical Author | San Francisco | 2009/01/12 | $86,000 |
| Unknown | Senior Javascript Developer | Edinburgh | 2012/03/29 | TBC |
| Airi Satou | Accountant | Tokyo | 2008/11/28 | $162,700 |
| Brielle Williamson | Integration Specialist | New York | 2012/12/02 | $372,000 |
| Unknown | Sales Assistant | San Francisco | 2012/08/06 | TBC |
| Rhona Davidson | Integration Specialist | Tokyo | 2010/10/14 | $327,900 |
| Colleen Hurst | Javascript Developer | San Francisco | 2009/09/15 | Not available |
| Sonya Frost | Software Engineer | Edinburgh | 2008/12/13 | $103,600 |
In this case we have two columns where absolute ordering can be useful:
- Name column where there are "Unknown" entries that should be shown at the top of the table.
- Salary column where "TBC" should be shown at the top and "Not available" should be shown at the bottom.
If you alter the sorting that is applied to the table by clicking on the headers of those columns, you will be able to see that those items stay in position regardless of the sorting of the column. If sorting is applied to one of the other columns the rows will be sorted normally.
Editor 1.6
I'm very pleased to announce the release of Editor 1.6, the sixth major update to Editor in its 1.x series. It is a free upgrade to all existing license holders and adds a number of exciting new features that greatly increase Editor's capabilities, particularly on the client-side.
In this post I'll run through a summary of the new features in 1.6 and in future posts explore how we can utilise them to enhance the applications developed with Editor further.
Editor 1.6 can be downloaded from its download page as both a free trial if you haven't tried Editor out yet, or if you have a license, the fully licensed version will automatically be downloaded.
Historic blog posts
- Dynamic enum sorting 16th Jun 2016
- Spring updates - 2016 24th May 2016
- Parent / child editing with Editor 25th Mar 2016
- Ellipsis renderer 26th Feb 2016
- Generator update 21st Jan 2016
- Download statistics 31st Dec 2015
- NPM and Bower 9th Nov 2015
- Editor's server-side events 2nd Oct 2015
- Multi-row bulk editing 11th Sep 2015
- Update extravaganza 13th Aug 2015
- Git repo structure update 2nd Jun 2015
- DataTables 1.10.7 30th Apr 2015
- Vertical page fitting 10th Apr 2015
- Editor 1.4 / DataTables 1.10.5 12th Feb 2015
- Ultimate date / time sorting plug-in 18th Dec 2014
- Editor 1.4 beta - .NET 4th Dec 2014
- Table captions 7th Nov 2014
- Search result highlighting 22nd Oct 2014
- DataTables 1.10.3 9th Oct 2014
- Sliding child rows 2nd Oct 2014
- Alphabet input search - Part III 22nd Sep 2014
- Permanent inline checkboxes 9th Sep 2014
- Alphabet input search - Part II 2nd Sep 2014
- Alphabet input search - Part I 26th Aug 2014
- Business: UK VAT exchange rates 8th Aug 2014
- Duplicate buttons in Editor 25th Jul 2014
- Introducing Responsive for DataTables 16th Jul 2014
- DataTables 1.10.1, Editor 1.3.2 and more 15th Jul 2014
- Nominet Internet Awards shortlist 17th Jun 2014
- Font Awesome integration 6th Jun 2014
- Support and forums updates 26th May 2014
- DataTables 1.10.0 released 1st May 2014
- DataTables 1.10.0 release candidate 25th Apr 2014
- DataTables 1.10 beta 4th Feb 2014
- HTML 5 Clipboard and File APIs 31st Jan 2014
- JS Bin update 24th Jan 2014
- Orthogonal data 9th Jul 2012
- Inline editing 31st May 2012
- Introducing Editor 4th May 2012
- DataTables debugger 26th Feb 2012
- Twitter Bootstrap 2 1st Feb 2012
- Microsoft CDN 28th Jan 2012
- localStorage for state saving 16th Jan 2012
- Twitter Bootstrap 8th Dec 2011
- Site updates - JS Bin and more 1st Nov 2011
- Getting started with DataTables 27th Aug 2011
- DataTables support 29th Jun 2011
- Drill-down rows 19th Jun 2011
- Introducing Scroller 11th Jun 2011
- DataTables 1.8 4th Jun 2011
- Creating beautiful and functional tables with DataTables 10th May 2011
- Extended data source options with DataTables 1st May 2011
DataTables
Editor