- Main
- Dashboard No active orders
- Layouts
- Themes
- Starter kit
- Changelog 2.3
- LTR version
- Forms
- Form components
- JSON forms
- Text editors
- Pickers
- Form layouts
- Components
- Basic components
- Content styling
- Extra components
- Color system
- Animations
- Icons
- Layout
- Page layouts
- Sidebars
- Navbars
- Vertical navigation
- Horizontal navigation
- Menu levels
- Data visualization
- Echarts library
- D3 library
- C3 library
- Google charts
- Maps integration
- Extensions
- Extensions
- JQuery UI
- File uploaders
- Event calendars
- Internationalization
- Tables
- Basic tables
- Data tables
- Data tables extensions
- Responsive tables
- Page kits
- General pages
- Service pages
- User pages
- Application pages
- Widgets
This example shows the basic use case of the
ColReorder
plugin. With ColReorder enabled for a table, the user has the ability to click and drag any table header cell, and drop it where they wish the column to be inserted. The insert point is shown visually, and the column reordering is done as soon as the mouse button is released. ColReorder is added to a DataTable through the R
character added to the dom
.
First Name | Last Name | Job Title | DOB | Status | Actions |
---|---|---|---|---|---|
Aura | Hard | Business Services Sales Representative | 19 Apr 1969 | Suspended | |
Chantal | Nailor | Technical Services Librarian | 10 Jan 1980 | Inactive | |
Cicely | Sigler | Senior Research Officer | 15 Mar 1960 | Pending | |
Coy | Wollard | Customer Service Operator | 12 Oct 1982 | Active | |
Delma | Bonds | Lead Brand Manager | 21 Dec 1968 | Pending | |
Jackelyn | Weible | Airline Transport Pilot | 3 Oct 1981 | Inactive | |
Kennedy | Haley | Senior Marketing Designer | 18 Dec 1960 | Active | |
Lizzee | Goodlow | Technical Services Librarian | 1 Nov 1961 | Suspended | |
Marth | Enright | Traffic Court Referee | 22 Jun 1972 | Active | |
Maxine | Woldt | Business Services Sales Representative | 17 Oct 1987 | Pending |
While the ColReorder insertion point indicator can be styled, another option to show the end user what the column will look like when the table has been reordered is to actually do the reordering while the mouse is still dragging the column header. This is shown in this example and is controlled by the
realtime
parameter.
First Name | Last Name | Job Title | DOB | Status | Actions |
---|---|---|---|---|---|
Aura | Hard | Business Services Sales Representative | 19 Apr 1969 | Suspended | |
Chantal | Nailor | Technical Services Librarian | 10 Jan 1980 | Inactive | |
Cicely | Sigler | Senior Research Officer | 15 Mar 1960 | Pending | |
Coy | Wollard | Customer Service Operator | 12 Oct 1982 | Active | |
Delma | Bonds | Lead Brand Manager | 21 Dec 1968 | Pending | |
Jackelyn | Weible | Airline Transport Pilot | 3 Oct 1981 | Inactive | |
Kennedy | Haley | Senior Marketing Designer | 18 Dec 1960 | Active | |
Lizzee | Goodlow | Technical Services Librarian | 1 Nov 1961 | Suspended | |
Marth | Enright | Traffic Court Referee | 22 Jun 1972 | Active | |
Maxine | Woldt | Business Services Sales Representative | 17 Oct 1987 | Pending |
A useful interaction pattern to use in DataTables is
state saving
, so when the end user reloads or revisits a page its previous state is retained. ColReorder works seamlessly with state saving in DataTables (stateSave
), remembering and restoring the column positions, as well as everything else such as sorting and filtering.
First Name | Last Name | Job Title | DOB | Status | Actions |
---|---|---|---|---|---|
Aura | Hard | Business Services Sales Representative | 19 Apr 1969 | Suspended | |
Chantal | Nailor | Technical Services Librarian | 10 Jan 1980 | Inactive | |
Cicely | Sigler | Senior Research Officer | 15 Mar 1960 | Pending | |
Coy | Wollard | Customer Service Operator | 12 Oct 1982 | Active | |
Delma | Bonds | Lead Brand Manager | 21 Dec 1968 | Pending | |
Jackelyn | Weible | Airline Transport Pilot | 3 Oct 1981 | Inactive | |
Kennedy | Haley | Senior Marketing Designer | 18 Dec 1960 | Active | |
Lizzee | Goodlow | Technical Services Librarian | 1 Nov 1961 | Suspended | |
Marth | Enright | Traffic Court Referee | 22 Jun 1972 | Active | |
Maxine | Woldt | Business Services Sales Representative | 17 Oct 1987 | Pending |
ColReorder provides the ability to specify a column ordering which is not that of the HTML (which typically you will want) through the parameter
colReorder.order
. This is an array of integers with the column ordering you want. In this example columns are ordered on initalization this way: 1, 3, 2, 4, 0, 5
, ordering functionality remains working even after predefined ordering.
Last Name | DOB | Job Title | Status | First Name | Actions |
---|---|---|---|---|---|
Hard | 19 Apr 1969 | Business Services Sales Representative | Suspended | Aura | |
Nailor | 10 Jan 1980 | Technical Services Librarian | Inactive | Chantal | |
Sigler | 15 Mar 1960 | Senior Research Officer | Pending | Cicely | |
Wollard | 12 Oct 1982 | Customer Service Operator | Active | Coy | |
Bonds | 21 Dec 1968 | Lead Brand Manager | Pending | Delma | |
Weible | 3 Oct 1981 | Airline Transport Pilot | Inactive | Jackelyn | |
Haley | 18 Dec 1960 | Senior Marketing Designer | Active | Kennedy | |
Goodlow | 1 Nov 1961 | Technical Services Librarian | Suspended | Lizzee | |
Enright | 22 Jun 1972 | Traffic Court Referee | Active | Marth | |
Woldt | 17 Oct 1987 | Business Services Sales Representative | Pending | Maxine |
© 2015 - 2018. Limitless Web App Kit by Eugene Kopyov