cardView.gridColumns
Define the number of columns to show at each breakpoint.
Please note - this property requires the CardView extension for DataTables.
Description
CardView's display grid will show a specific number cards per row (i.e. a column count). How many is determined by the content width of the container, cardView.breakpoints and this parameter.
Depending on the content of your cards, you may find that you wish to alter the number of columns displayed when in card view. That can be done with this parameter.
Which value is used for the number of columns is determined by the content container's width and where that falls in the cardView.breakpoints array.
Type
object
This parameter is an object which has the properties huge, large, medium, small and tiny. The value for each property must be a positive integer.
Default
The default is an object with the following values:
gridColumns: {
huge: 5,
large: 4,
medium: 3,
small: 2,
tiny: 1
}
Example
Increase the number of columns for most breakpoints:
new DataTable('#myTable', {
cardView: {
gridColumns: {
huge: 5,
large: 5,
medium: 3,
small: 3,
tiny: 2
}
}
});