⚠ 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

error after delete



mascha
  • profile picture
  • Member

Posted 22 October 2017 - 05:49 AM

Hi all,

 

when i'am delete on grid, data show error :

 

error :

{"success":true,"success_message":"

Your data has been successfully deleted from the database.<\/p>"}

 

my controller:

public function add_master_barang()
       {
        try{
            $crud = new grocery_CRUD();

            $crud->set_theme('flexigrid');
            $crud->set_table('master_barang');
            
                //dropdownlist satuan
                //https://stackoverflow.com/questions/25670147/grocery-crud-field-type-dropdown-with-custom-array-data
                $this -> db -> select ('code,description');               
                $this->db->where('fk_lookup_grp =3');
                $query = $this -> db -> get('lookup');
                $finalArray = array();
                foreach ($query->result_array() as $row)
                {
                $finalArray[$row['code']] = $row['description']; 
                }

                //dropdownlist satuan
                $this -> db -> select ('ID_SUPPLIER,PERUSAHAAN');
                $query = $this -> db -> get('supplier');
                $supplierArray = array();
                foreach ($query->result_array() as $row)
                {
                $supplierArray[$row['ID_SUPPLIER']] = $row['PERUSAHAAN']; 
                }

            $crud->field_type('satuan','dropdown', $finalArray);
            $crud->field_type('supplier','dropdown', $supplierArray);
            $crud->required_fields('kode_barang','nama_barang','satuan','netto','supplier');    
           // $crud->unset_jquery();
           // $crud->unset_jquery_ui();
            $output = $crud->render();
            $output->title = "Form Input Master Barang";
            $output->meta_keywords = "Something 2";
            $this->_example_output($output);

        }catch(Exception $e){
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }

in database data success to delete, 

 

any idea for this problem?


Amit Shah
  • profile picture
  • Member

Posted 23 October 2017 - 06:13 AM

Hi,

 

well as per the experience goes, this is more to do with some jquery clash. if there are multiple jquery libraries loaded or more then once, this issue comes up. Do check in the page source to see if there are multiple calls ...

if there are - will recommend avoding the same so the issue gets resolved.

 

Or - check if there are any error that gets shooted up in console that is causing the trouble...

 

Happy GCing :)