Rad,
If I understand you correctly, you want to use Datatables in the AJAX per page style of data loading rather than trying to use all of the data at one time - as it currently is with the Datatables theme. I've started down this development path to see how difficult it would be. I have not gotten this to work, but it looks possible.
First, I copied the "datatables" them to "datatables_ajax". I then figured out that the list.php view can be used to output the JSON aaData that Datatables uses as it's source ({controller}/index/ajax_list - action). The list_template.php on the other hand is where many of the controls are located. I have not gotten any further... Maybe some day I will continue the efforts. Good luck!
The code below has a few hacks in it, but it does load the AJAX data from list.php into the Datatable.
<?php
// Determine admin status and route
$ci =& get_instance();
$controller = $ci->router->fetch_class(); // class = controller
$method = $ci->router->fetch_method();
$base_url_to_replace = site_url('');
// Make JSON Data (aaData) for Datatables
// Format List Data for Datatables aaData
$datatables_data = array();
$datatables_data = array();
foreach ($list as $num_row => $row)
{
$datatables_row = array();
foreach ($columns as $column)
{
$datatables_row[] = $row->{$column->field_name};
}
$actions_value = '';
if (!$unset_delete || !$unset_edit || !empty($actions))
{
if (!empty($row->action_urls))
{
foreach ($row->action_urls as $action_unique_id => $action_url)
{
// JJW - Cutom url hack
$action_url = str_replace($base_url_to_replace, '/', $action_url);
$action = $actions[$action_unique_id];
// JJW - custom target hack
$target = (preg_match('/desc/i', $action->label) || preg_match('/note/i', $action->label)) ? ' target="_blank"' : '';
$actions_value .= '<a href="'.$action_url.'" class="edit_button ui-button ui-widget ui-state-default ui-corner-all '.
'ui-button-text-icon-primary target_blank_class" role="button"'.$target.'>'.
'<span class="ui-button-icon-primary ui-icon '.$action->css_class.' '.$action_unique_id.'"></span><span '.
'class="ui-button-text"> '.$action->label.'</span></a>';
}
}
if (!$unset_edit)
{
$actions_value .= '<a href="'.$row->edit_url.'" class="edit_button ui-button ui-widget ui-state-default ui-corner-all '.
'ui-button-text-icon-primary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-pencil"></span>'.
'<span class="ui-button-text"> '.$this->l('list_edit').'</span></a>';
}
if (!$unset_delete)
{
$actions_value .= '<a onclick = "javascript: return delete_row(''.$row->delete_url.'', ''.$num_row.'')" '.
'href="javascript:void(0)" class="delete_button ui-button ui-widget ui-state-default ui-corner-all '.
'ui-button-text-icon-primary" role="button">'.
'<!-- span class="ui-button-icon-primary ui-icon ui-icon-circle-minus" /span -->'.
'<span class="ui-button-text" style="padding: 0.4em 0.5em 0.4em 0.5em;">'.
// JJW Hack X for $this->l('list_delete');
'X</span></a>';
}
$datatables_row[] = $actions_value;
}
$datatables_data[] = $datatables_row;
}
$datatables_data = array('aaData' => $datatables_data);
//$ci->output->set_content_type('application/json');
echo json_encode($datatables_data);