⚠ 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

search problem in flexigird



casachit
  • profile picture
  • Member

Posted 12 September 2012 - 09:56 AM

i m using gcrud [color=#2C575B][font=Arial, Tahoma, Helvetica, sans-serif]1.2.3... but I having problem with search in flexigrid..whenever i click search it won't work... when i check console i got following error as attached in image...

Please help.. needed... as soon as possible... if anyone has gcrud v1.2.3.. can you provide me[/font][/color]

victor
  • profile picture
  • Member

Posted 13 September 2012 - 08:21 AM

HI!
maybe this post will help you /topic/853-search-products-in-flexigrid/#entry3350

casachit
  • profile picture
  • Member

Posted 13 September 2012 - 09:03 AM

sorry victor I have unique column name... and here's what I have debug and found out that set_relation is applied on same table..i.e


$crud->set_table('users')
->set_relation('name','users','{username}',array('user_id > =>24'));


do you have any workaround for this??

secondly I have problem in other tables too where I can't search on column created by callback_column... those column doesn't exists in database table....

while search is working perfectly in datatables theme... I can't use datatables since my client loves the looks of flexigrid...

victor
  • profile picture
  • Member

Posted 13 September 2012 - 10:14 AM

what you see in the log file?
Sorry, my English bad.

Let me see your controller's code.

casachit
  • profile picture
  • Member

Posted 13 September 2012 - 10:27 AM


$user = new grocery_CRUD();
$user -> set_theme('flexigrid');
$user -> set_table('users');
$user -> set_subject('All Users');
$user -> required_fields('user_first_name', 'user_last_name', 'user_email', 'users_addr1', 'users_city', 'users_state', 'users_phone', 'user_role_id', 'users_rep_assigned','user_username','user_password');
$user -> set_relation('user_role_id', 'role', 'role_name');
$user -> set_rules('user_email', 'Email Address', 'valid_email|callback_email_check|required');
$user -> set_rules('user_username', 'Username', 'callback_username_check|required');
$user -> set_relation('users_rep_assigned', 'users', '{user_first_name} {user_last_name}', array('user_role_id' => '2'));
$user -> fields('user_first_name', 'user_last_name', 'user_email', 'users_company', 'users_addr1', 'users_addr2', 'users_city', 'users_state', 'users_phone', 'users_alt_phone', 'user_role_id', 'users_rep_assigned','user_added_date');
$user -> change_field_type('user_added_date', 'invisible');
$user -> columns('user_first_name','user_last_name', 'user_email', 'user_role_id', 'users_rep_assigned','user_added_date');


this is my comtroller code

victor
  • profile picture
  • Member

Posted 13 September 2012 - 10:33 AM

[quote name='casachit' timestamp='1347527038' post='3390']
while search is working perfectly in datatables theme... I can't use datatables since my client loves the looks of flexigrid...
[/quote]

because datatables search text without database queries.

casachit
  • profile picture
  • Member

Posted 13 September 2012 - 10:45 AM

[quote name='victor' timestamp='1347532384' post='3394']
because datatables search text without database queries.
[/quote]

okay .... but did you something wrong in my controller code??

casachit
  • profile picture
  • Member

Posted 13 September 2012 - 10:48 AM

[quote name='victor' timestamp='1347531259' post='3392']
what you see in the log file?
Sorry, my English bad.

Let me see your controller's code.
[/quote]

victor
  • profile picture
  • Member

Posted 13 September 2012 - 20:24 PM

what a database error you get? Know how to look?

casachit
  • profile picture
  • Member

Posted 14 September 2012 - 01:53 AM

No i didn't get database error... only error i got is error 500 while looking on console.....

casachit
  • profile picture
  • Member

Posted 14 September 2012 - 03:13 AM

sorry I don't how to look for database error... since data I want is showing up on grid..

victor
  • profile picture
  • Member

Posted 14 September 2012 - 06:54 AM

http://codeigniter.c...ral/errors.html You can see database error in log file.