Jump to content


Hemant Randive

Member Since 06 May 2015
Offline Last Active Nov 30 2015 12:43 PM
-----

Posts I've Made

In Topic: Export to CSV (Excel)?

24 November 2015 - 07:01 AM

I am exporting the content from a table.But when it get exported in one column it show ####.I am using custom model for this. my code is

 

public function export_accounts_data() {
          $crud = new grocery_CRUD();
        //$month = $this->input->post('month');
         // $month = $this->uri->segment(5);
          $month= intval($_POST['month']);
          //var_dump($month);
      
        $crud->set_model('custom_query_model');
    $crud->set_theme('datatables');
     
        $crud->set_subject('E-counseling');
        $crud->set_table('e_counseling_session_master'); //Change to your table name
        $crud->basic_model->set_query_str('SELECT e.session_id,e.session_name,e.case_id,e.description,e.date,e.time,u.id,u.name,em.name,em.lname,em.Gender,em.org_code,em.email,e.status,e.type,e.fees 
        FROM e_counseling_session_master e, users u,end_employee_master em WHERE e.counselor_id = u.id AND MONTH(e.date)= '.$month. ' AND em.id = (Select DISTINCT sfm.eemp_id from session_feedback_master sfm where sfm.session_id = e.session_id ) AND
        e.fees_status = "Completed" ORDER BY e.case_id'); //Query text here
        $crud->display_as('id', 'Counselor ID');
        //$crud->display_as('name', 'Counselor Name');
        $crud->columns('session_id', 'id', 'session_name', 'case_id', 'description', 'date', 'time', 'status', 'type', 'fees', 'name', 'lname', 'Gender', 'org_code', 'email');
 
$crud->order_by('date', 'desc');
 
        $crud->unset_add();
        $crud->unset_edit();
        $crud->unset_delete();
 
        $output = $crud->render();
        $this->_example_output($output);
    }

In Topic: ORDER BY works only for one column at a time

20 November 2015 - 11:55 AM

I am using grocery crud datatables theme i have tried flexigrid too but its sorting of table by two columns not work in it. I want to sort the table by two columns in grocery crud view


In Topic: grocerycrud and bootstrap

20 November 2015 - 09:35 AM

How to sort the table in grocery crud view on basis of two columns....like i want to sort the table on 'status' and 'creation_date' column  


In Topic: grocerycrud and bootstrap

20 November 2015 - 09:13 AM

Yes my UI is not using bootstrap but what about other functions of the theme even i am not able to sort column by clicking on them...nothing is working 


In Topic: grocerycrud and bootstrap

20 November 2015 - 07:27 AM

Hello we are using bootstrap theme for our web application,but the functionallity like sorting of records,editing,deleting not working also it is disturbing other UI too.Please suggest some solutions