EllisLab text mark
Advanced Search
21 of 30
21
   
Ignited DataTables
Posted: 03 February 2012 12:16 AM   [ # 311 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-15
91 posts
Ferry Lukito - 02 February 2012 09:11 AM

please help

why this code is work for me

$(document).ready(function() 
    

        
$('#sortable_table').dataTable({
            
"sScrollY"430,
            
"bJQueryUI"true,
            
"sPaginationType""full_numbers",
            
"bProcessing"true,
            
"bServerSide"true,
            
"sAjaxSource""<?php echo base_url(); ?>index.php/customers/getall"
        
});
    
}); 

and this code is’nt work

$(document).ready(function() 
    

        
$('#sortable_table').dataTable({
            
"sScrollY"430,
            
"bJQueryUI"true,
            
"sPaginationType""full_numbers",
            
"bProcessing"true,
            
"bServerSide"true,
            
"sAjaxSource""<?php echo base_url(); ?>customers/getall"
        
});
    
}); 

is there need setup the route ?
thanks.

maybe you didn’t setup aoColumns?

 Signature 

Ignited Datatables

 
Posted: 03 February 2012 02:23 AM   [ # 312 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-26
111 posts

Probably he didnt / couldnt setup .htaccess file.

 Signature 

Ignited Datatables
Nested Sets

 
Posted: 03 February 2012 02:27 AM   [ # 313 ]   [ Rating: 0 ]
Joined: 2012-02-02
2 posts

@cryogenix thanks..

ηυмвєяσηє - 03 February 2012 02:23 AM

Probably he didnt / couldnt setup .htaccess file.

i think so, i will check it.

thanks so much

 
Posted: 09 February 2012 08:16 PM   [ # 314 ]   [ Rating: 0 ]
Joined: 2010-02-04
8 posts

if user has JavaScript turned off will this library still work?
since produce_output function outputs json encoded string, how to change it to output html for progressive enhancement.
a plain HTML table, drawn for the benefit of people who dont have JavaScript enabled
thanks

 
Posted: 12 February 2012 11:08 PM   [ # 315 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-15
91 posts

no it will not work.

 Signature 

Ignited Datatables

 
Posted: 14 February 2012 03:18 AM   [ # 316 ]   [ Rating: 0 ]
Joined: 2012-02-14
1 posts

Is Version 0.6 the last available version?

 
Posted: 14 February 2012 08:17 PM   [ # 317 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-15
91 posts

yes.

 Signature 

Ignited Datatables

 
Posted: 27 February 2012 03:27 AM   [ # 318 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-16
53 posts

please help

my model

$this->load->library('Datatables');
$this->datatables->select("nama, IF(jenkel=1, 'PRIA', IF (jenkel=2, 'WANITA', jenkel)) AS jenkel")
->
from('tu_maskar')
return 
$this->datatables->generate(); 

why if statement on ‘select’ query isn’t work? i have been tested on sqlYog is work fine

 Signature 

belajar adalah sebuah keberanian diri untuk menantang ketidakmungkinan.

belajar dengan sungguh-sungguh hanya bisa di lakukan oleh seseorang yang bukan penakut.

 
Posted: 28 February 2012 03:16 AM   [ # 319 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-16
53 posts

SOLVED
i just add ‘FALSE’ on my script

$this->datatables->select("nama, IF(jenkel=1, 'PRIA', IF (jenkel=2, 'WANITA', jenkel)) AS jenkel"FALSE
 Signature 

belajar adalah sebuah keberanian diri untuk menantang ketidakmungkinan.

belajar dengan sungguh-sungguh hanya bisa di lakukan oleh seseorang yang bukan penakut.

 
Posted: 01 March 2012 02:14 PM   [ # 320 ]   [ Rating: 0 ]
Joined: 2012-03-01
2 posts

hi everyone! i’m starting with codeigniter and i need a jquery datatable.
i don’t know how to join codeigter and this library.
please can someone help me with onine example? thanks for everything!

 
Posted: 05 March 2012 01:50 AM   [ # 321 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-15
91 posts

try the wiki if that will shed some light for you: https://github.com/IgnitedDatatables/Ignited-Datatables/wiki/Method-Chaining

i will try to give a full blown example as soon as i get some time off… really really busy right now so i’m kind of sorry for the inactivity…

 Signature 

Ignited Datatables

 
Posted: 05 March 2012 08:37 AM   [ # 322 ]   [ Rating: 0 ]
Joined: 2012-03-01
2 posts

hi! thnx for the reply! i’m working on it!
i thing it works nearly well because it shows the number of result properly but not show any result only a messagebox saying:  DataTables warning(table id=‘test’): Requested unknown parameter ‘0’ from the data source for row 0.

the controller:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class 
Home extends CI_Controller {
 
public function __construct()
 
{
  parent
::__construct();
  
$this->load->model'mUsers' );
 
}
 
public function index()
 
{
  $this
->load->view'home' );
 
}
 
public function read()
 
{
  $this
->load->library('Datatables'); 
  
$this->datatables
  
->select('id, name,email')
   ->
from('users');
  echo 
$this->datatables->generate();
  
 
}


and the view:

<html>
 <
head>
  <
title>
   
Test
  
</title>
  <
base href="<?php echo base_url(); ?>" />
  <
link type="text/css" rel="stylesheet" href="css/smoothness/jquery-ui-1.8.2.custom.css" />
  <
link type="text/css" rel="stylesheet" href="css/styles.css" />
  
[removed][removed]
  [removed][removed]
</head>
 <
body>
  <
div id="dt_example">
  <
table id="test" class="display">
    <
thead>
      <
tr>
        <
th>ID</th>
        <
th>Name</th>
        <
th>mail</th>
      </
tr>
    </
thead>
    <
tbody>
      <
tr>
        <
td colspan="3" class="dataTables_empty">Loading...</td>
      </
tr>
    </
tbody>
  </
table>
</
div>
[removed]
  
var sity;

  $(
document).ready(function()
  
{
    sity 
= $('#test').dataTable
    
({
      
'iCookieDuration'60,
      
'bStateSave'     true,
      
'bServerSide'    true,
      
'bAutoWidth'     false,
      
'sPaginationType''full_numbers',
      
'sAjaxSource'    '<?php echo base_url();?>index.php/home/read',
      
'aoColumns'      
      
[
        
        { 
'sName' 'id' },
         
'sName' 'name' },
     
'sName' 'email' }
      ]
,
      
'fnServerData': function(sSourceaoDatafnCallback)
      
{
        
$.ajax
        
({
          
'dataType''json',
          
'type'    'POST',
          
'url'     sSource,
          
'data'    aoData,
          
'success' fnCallback
        }
);
      
}
    }
);
  
});
[removed]
   
 
</body>
</
html

 

thanks for the help!

EDIT: that works!
nothing to solve!

 
Posted: 05 March 2012 10:36 PM   [ # 323 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-15
91 posts

i’m glad to be of help then…. =)

 Signature 

Ignited Datatables

 
Posted: 13 April 2012 05:12 AM   [ # 324 ]   [ Rating: 0 ]
Joined: 2012-03-05
4 posts

Hello everybody,
I have a little bug in filtering my datatable using your library.
This is my query to feed the datatable :

$this->datatables->select('NOM_FICHIER AS ID_NOM_FICHIER,NUM_DOSSIER,LABO_INTERNE,NOM,PRENOM,DATE_RECEPTION,DATE_EXPEDITION,DATE_SUPPRESSION,USER_SUPPRESSION,CODE_DESTINATAIRE,NOM_DESTINATAIRE,NOM_FICHIER,TYPE_DOC,STATUT,AUDIT,DATE_RECEPTION_AUDIT')->from($groupement.'_impression')->where('STATUT=\'Supprimé\' OR STATUT=\'Envoyé\'',NULL,FALSE); 

Everything is ok for feeding the datatable, but when I want to search withing the results, for exemple “Envoyé” (which is supposed to return only the rows with STATUT at “Envoyé”), it returns the rows “Supprimé” too.
And whatever I type in the search field, it returns always the rows with “Supprimé”.
If I remove ‘STATUT=\‘Supprimé\’ from my query everything is fine.
I don’t understand where the problem is, I’ve made several datatables, but it’s the only one which is buggy.

Thanks in advance !

 
Posted: 13 April 2012 02:58 PM   [ # 325 ]   [ Rating: 0 ]
Avatar
Joined: 2011-03-26
111 posts

try:

->where('( STATUT=\'Supprimé\' OR STATUT=\'Envoyé\' )',NULL,FALSE);  // added parenthesis there.. 

insted of

->where('STATUT=\'Supprimé\' OR STATUT=\'Envoyé\'',NULL,FALSE); 

Regards,
Yusuf

 Signature 

Ignited Datatables
Nested Sets

 
21 of 30
21