Fix Column

Fix Column

arkandiaarkandia Posts: 1Questions: 1Answers: 0

how to add fix column to my table ?

this is my code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<body>

<style type="text/css" title="currentStyle">        
    @import "css/demo_table_jui.css";
    @import "css/jquery-ui-1.8.4.custom.css";
</style>
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="js/dataTables.scroller.js"></script>
<script type="text/javascript" language="javascript" src="js/dataTables.scroller.js"></script>
<script type="text/javascript" charset="utf-8">






    $(document).ready(function() {
        oTable = $('#example').dataTable({
            "bJQueryUI": true,
            scrollY:        "300px",
            scrollX:        "100%",
            scrollCollapse: true,
            "sPaginationType": "full_numbers"
        });
        new $.fn.dataTable.FixedColumns( oTable );
    } );





</script>


<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
<thead>
    <tr>
        <th>no</th>
        <th>pkpp</th>
        <th>id_pel</th>
        <th>nama_pel</th>
        <th>alamat</th>
        <th>tarif_lama</th>
        <th>daya_lama</th>
        <th>tarif_baru</th>
        <th>daya_baru</th>
        <th>jenis_transaksi</th>
        <th>tanggal_bayar</th>
        <th>tanggal_sambung</th>
        <th>merk_kwh</th>
        <th>nomor_kwh</th>
        <th>pembatas_terpasang</th>
        <th>nomor_segel</th>
        <th>tic_cable</th>
        <th>accesories</th>
        <th>kabel_tufur</th>
        <th>box_tufur</th>
        <th>kumis</th>
        <th>petugas_pelaksana</th>
        <th>keterangan</th>
    </tr>
</thead>
<tbody>
    <?php
    include "/db/db_connection.php";

    $query = mysql_query("SELECT * FROM tb_selesai");
    $no = 1;
    while($r=mysql_fetch_array($query)){
        echo "<tr class='grade'>
        <td>$no.</td>
        <td>$r[pkpp]</td>
        <td>$r[id_pel]</td>
        <td>$r[nama_pel]</td>
        <td>$r[alamat]</td>
        <td>$r[tarif_lama]</td>
        <td>$r[daya_lama]</td>
        <td>$r[tarif_baru]</td>
        <td>$r[daya_baru]</td>
        <td>$r[jenis_transaksi]</td>
        <td>$r[tanggal_bayar]</td>
        <td>$r[tanggal_sambung]</td>
        <td>$r[merk_kwh]</td>
        <td>$r[nomor_kwh]</td>
        <td>$r[pembatas_terpasang]</td>
        <td>$r[nomor_segel]</td>
        <td>$r[tic_cable]</td>
        <td>$r[accesories]</td>
        <td>$r[kabel_tufur]</td>
        <td>$r[box_tufur]</td>
        <td>$r[kumis]</td>
        <td>$r[petugas_pelaksana]</td>
        <td>$r[keterangan]</td>



        </tr>";
        $no++;
    }
    ?>
</tbody>

</body>
</html>

This discussion has been closed.