Hazuan Nazri 0 Junior Poster in Training

Hello guys,

im trying to learn how to use dynamic data table, which means i want to use data table as my searching result table. but i dint know how to make it because when the search result filled in the table, the sort and other "DataTable" function is not working.


<table id="dyntable" class="sortable table table-bordered responsive">
                                <col class="con0" style="align: center; width: 4%" />
                                <col class="con1" />
                                <col class="con0" />
                                <col class="con1" />
                                <col class="con0" />
                                    <th class="head0 nosort">No</th>
                                    <th class="head0">Nama</th>
                                    <th class="head1">No IC</th>
                                    <th class="head0">NO Geran</th>
                                    <th class="head1">No Lot</th>
                                    <th class="head1">Alamat</th>
                                    <th class="head1">Kategori Pemilik</th>
                                    <th class="head1">Pengesahan</th>
                                    <th class="head1">Pamer Profil</th>
                            <tbody id="tablehasil">                      


$("#submit").live("click", function() { //trying to use .live & .on
        type: "POST",
        url: "../controller/searching.php",
        data: dataString,
        cache: false,
        success: function(html)


while ($rowNegeri=sqlsrv_fetch_array($ResultNegeri))
    echo '  <tr class="gradeX">
    <td><div align="center">'.$rowNegeri['U_PIR_ID'].'</div></td>
    <td>Negeri: '.$rowNegeri['Negeri'].'<br>Daerah: '.$rowNegeri['Daerah'].'<br>Mukim: '.$rowNegeri['Mukim'].'</td>

    if($rowNegeri['Tahap_Pengesahan'] == 1)
        echo '<td>Telah Disahkan</td>';
        echo '<td>Belum Disahkan</td>';
    echo '<td><center><a href="" class=""><span class="icon-th"></span></center></td>

i hope someone can teach me how to use DataTable, because i cant understand when read it on DataTable website.