How to set pageLength on jquery datatable depending on specific column?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

How to set pageLength on jquery datatable depending on specific column?



I have a table like this enter image description here



But I'm trying to set de pageLength parameter depending on the first column to get something like this enter image description here



My datatable paramerters so far are:


var table = $('#table-comp').DataTable(
language:spanish,
columns: [

name: 'competencia',
title: 'Nombre de Competencia',
,


title: 'Grado Indicador',
,

title: 'Sel',

],
data: datos,
lengthChange: false,
searching: false,
pageLength: 6 //<--- Here is my problem. Not always is 6 fixed.
paging: true,
order: ,
rowsGroup: [
'competencia:name'
],
)
table.draw(false);



Help me please!









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Trying to Print Gridster Items to PDF without overlapping contents