2017-06-06 3 views
1

をDataTableの:ソートは、私がデータを表示するプラグインのDataTableを使用しますが、私はPHPおよびAJAXでテーブルのデータを変更するjQueryの

$aColumns = array(
    'entity_id', 
    'entity_immatriculation', 
    'entity_designation', 
    'categorieentity_label', 
    'emplacemententity_label', 
    'familleentity_label', 
    'entity_date_destruction', 
    'entity_prix', 
    'id_entity_etat' 
); 

Model::factory('entity')->_ajax_entity($aColumns,$this->_controller); 

モジュール:

foreach($rResult as $aRow) 
{ 
    $row = array(); 
    for ($i = 0; $i < count($aColumns); $i++) 
    { 
    if ($i == 6) 
    { 
     $row[] = $compteur; 
    } 
    }  
} 

表示ですOKですが、テーブルの種類は常に古い値であるentity_date_destruction助けてください。

答えて

0

デフォルトの並べ替えを変更するには、以下の構文を使用できます。

最初の(0)列をソートします。

関連する問題