DataTables Blog http://www.datatables.net/blog en-us Tutorials and news about DataTables Vertical scroll fitting Back in 2015 I introduced a plug-in for DataTables which provides the ability to dynamically alter the page length of a table to have it fit inside a container. This works well when paging is enabled and scrolling is disabled, but vertical fitting of the DataTable also works quite naturally with scrolling.

In this post I will introduce an equivalent plug-in for DataTables when scrolling is enabled - the end result is shown below:

{example-table-thin #scrollResize}
Click and drag me!

Continue reading...

]]>
Sun, 31 Dec 2017 14:24:00 GMT http://www.datatables.net/blog/2017-12-31 http://www.datatables.net/blog/2017-12-31
Experiment: SearchPane Normally when I release new software for DataTables, I'll build it in a way that suits my own needs, generalising where I think it suitable, and then publish it and iterate from there. However, this time I'd like to take a slightly different approach and introduce a new plug-in for DataTables, called SearchPane, before including it in the DataTables extensions. This is both to see if there is interest in the features it provides and to request feedback for things that you would like to see modified / improved / added / removed / etc.

First things first - what is SearchPane? Quite simply it is a column filter interface for DataTables. It presents a list of values that can be found in a column, displaying them for an end user to be able to click, searching the table for matching data. It is a column OR based filter - i.e. adding multiple options will display the rows which match any of those data points.

Let's take a look at it in action:

{example-table}

You can also see this example on its own and with a vertical display.

Continue reading...

]]>
Thu, 30 Nov 2017 14:41:00 GMT http://www.datatables.net/blog/2017-11-30 http://www.datatables.net/blog/2017-11-30
Queuing changes in Editor When presenting editable data to users, there will be occasions where you (or the end user!) wish to queue up multiple changes to be submitted all at the same time. Editor's multi-row editing ability addresses this for fields which are to be edited so they all have a single value, but you might wish to edit rows individually and then batch submit them. This also can be done with Editor and in this post I'll explore how exactly to achieve this.

As usual, let's just straight into an example - you will see here that as you edit the data in the table, the Save changes and Discard changes buttons are enabled. Click the Save changes button and the changes that have been made will be saved to the server. Click the Discard changes button and yes, you guessed it, the changes made will be discarded and the original data restored.

Name Salary
Name Salary

Continue reading...

]]>
Tue, 24 Oct 2017 12:33:00 GMT http://www.datatables.net/blog/2017-10-24 http://www.datatables.net/blog/2017-10-24