⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

enable search option



jakjothi
  • profile picture
  • Member

Posted 09 January 2013 - 08:06 AM

in my datatables theme print, export and search option doesn't show please help how to display these options

victor
  • profile picture
  • Member

Posted 09 January 2013 - 08:14 AM

what version GC do you use?

victor
  • profile picture
  • Member

Posted 09 January 2013 - 08:15 AM

what version GC do you use?

jakjothi
  • profile picture
  • Member

Posted 10 January 2013 - 05:54 AM

[quote name='victor' timestamp='1357719282' post='5021']
what version GC do you use?
[/quote]

version 1.3.3 latest version

victor
  • profile picture
  • Member

Posted 10 January 2013 - 06:52 AM

those options show by default. show your code.

jakjothi
  • profile picture
  • Member

Posted 10 January 2013 - 07:17 AM

[quote name='victor' timestamp='1357800756' post='5024']
those options show by default. show your code.
[/quote]


function __construct()
{
parent::__construct();
$this->load->database();
$this->load->library('grocery_CRUD');
}

function index()
{
$this->load->view('header');
$this->load->view('nav');
$this->load->view('sidebar');
$this->load->view('dashboard');
$this->load->view('footer');

}

function get_category()
{

$this->category_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));

$crud = new grocery_CRUD();

$crud->set_theme('datatables');
$crud->set_table('t_category');
$crud->set_subject('Category');
$crud->columns('categoryName', 'friendlyName', 'description', 'status');
$crud->fields('categoryName', 'friendlyName', 'description', 'status');
$crud->display_as('categoryName', 'Name')->display_as('friendlyName', 'Slug Name');
$crud->add_action('Change Status', '', 'c_category/change_status');
$crud->required_fields('categoryName', 'friendlyName', 'status');

$crud->change_field_type('status', 'true_false');
//$crud->set_relation('parentId','t_cat_parent','parentName');
$output = $crud->render();
$this->category_output($output);
}

function category_output($output)
{
$this->load->view('category.php', $output);
}

jakjothi
  • profile picture
  • Member

Posted 10 January 2013 - 07:21 AM

[quote name='jakjothi' timestamp='1357802262' post='5025']
function __construct()
{
parent::__construct();
$this->load->database();
$this->load->library('grocery_CRUD');
}

function index()
{
$this->load->view('header');
$this->load->view('nav');
$this->load->view('sidebar');
$this->load->view('dashboard');
$this->load->view('footer');

}

function get_category()
{

$this->category_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));

$crud = new grocery_CRUD();

$crud->set_theme('datatables');
$crud->set_table('t_category');
$crud->set_subject('Category');
$crud->columns('categoryName', 'friendlyName', 'description', 'status');
$crud->fields('categoryName', 'friendlyName', 'description', 'status');
$crud->display_as('categoryName', 'Name')->display_as('friendlyName', 'Slug Name');
$crud->add_action('Change Status', '', 'c_category/change_status');
$crud->required_fields('categoryName', 'friendlyName', 'status');

$crud->change_field_type('status', 'true_false');
//$crud->set_relation('parentId','t_cat_parent','parentName');
$output = $crud->render();
$this->category_output($output);
}

function category_output($output)
{
$this->load->view('category.php', $output);
}
[/quote]
[img]C:\Users\Elcot\Desktop\c.jpg[/img]

victor
  • profile picture
  • Member

Posted 10 January 2013 - 07:42 AM

Is there the problem when you use the default theme?