Left and first row inmobilization

Left and first row inmobilization

bgnumisbgnumis Posts: 3Questions: 2Answers: 0

Hi, I want to inmovilize the first and the edit column but there is no way to make function, what should i be putting? What should I use to freeze the first row?

$(document).ready(function(){
var dataTable = $('#personal').DataTable({
"paging": false,

"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.24/i18n/Spanish.json" },
"fixedColumns": {
leftColumns: 2
},
"bFilter": false,

"bInfo": false,
"processing" : true,
"serverSide" : true,
"responsive": true,
"order" : [],
"ajax" : {
url:"datos.php",
type:"POST"
}

});

$('#personal').on('draw.dt', function(){/Osr``Ea``Carmen``Garijo``Na``Pr``Juan``Ondina``Marta``Crisl``Angeles``Ger``Antonio``Gaspar``Raquel``Victor``Reyes``Vanesa/
$('#personal').Tabledit({
url:'edicion.php',
dataType:'json',
columns:{
identifier : [0, 'idp'],
editable:[[1, 'Os'], [2, 'El'], [3, 'Ca'],[4, 'Ga'],[5, 'Na'],[6, 'Prado'],[7, 'Juan'],[8, 'On'],[9, 'Marta'],[10, 'Cril'],[11, 'An'],[12, 'Gerardo'],[13, 'Antonio'],[14, 'Gaspar'],[15, 'Raquel'],[16, 'Victor'],[17, 'Reyes'],[18, 'Vanesa']]
},
restoreButton:false,
onSuccess:function(data, textStatus, jqXHR)
{
if(data.action == 'delete')
{
$('#' + data.idp).remove();
$('#personal').DataTable().ajax.reload();
}
}
});
});

});

My index:

<html>
<head>
<title>CuVisit</title>

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.css">

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" />


</script>


</head>
<body>

Cuadrante de Visitas


Anem a més
ID Oscar Elena Carmen Garijo Nacho Prado Juan Ondina Marta Cristobal Angeles Gerardo Antonio Gaspar Raquel Victor Reyes Vanesa

<br />
<br />
</body>
</html>

Replies

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,769

    I want to inmovilize the first and the edit column but there is no way to make function,

    Are you loading the fixedColumn JS and CSS? See this example. Use the Download Builder to get all the needed JS and CSS files.

    What should I use to freeze the first row?

    Datatables doesn't have a way to freeze the first row.

    Kevin

This discussion has been closed.