-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ajaxdatatables and whereclause issue #219
Comments
Hi @mpixelz So if you enable AjaxTable then of course it will skip your code in the if statement since !$this->data['crud']->ajaxTable() === false. Can you tell us more about what do you want to do? Maybe we can help you with that. Regards |
this is what im trying to do? |
@mpixelz then |
i know i tried that.. but then whats the use of enabling ajaxdatatables if we are still going to do the query manually.. im just trying to have the |
Hi @mpixelz , You can use I think for your case this should work: -$this->data['entries'] = $this->data['crud']->getEntries()->where('registrationstep', null);
+$this->crud->addClause('where','registrationstep', null); or maybe $this->crud->addClause('whereNull','registrationstep'); |
does not work.. |
@mpixelz |
yes something like that.. the ajax part is handled automatically by backpack... thats how i am using it on the above mentioned method.. but the enableAjaxDatatables method doesn't work on that and i dont know where i need to put the clause for it to pick it up. @tabacitu your above mentioned method should have worked as they do make sense but they dont work for some reason. |
That's odd. The
Cheers! |
i think it works but i have custom buttons and using it on a overwritten view file.. may be that is causing all this hassle.. im going to implement it on a separate page as see if something changes. |
Sorry I couldn't be of more help. Cheers! |
hi.. very quick question.. in backpack crud controller.. if i enable the ajaxdatatable.. where do i define my where clause?
currently im doing this:
it works without the ajaxtable as its inside the
if (! $this->data['crud']->ajaxTable()) { $this->data['entries'] = $this->data['crud']->getEntries()->where('registrationstep', null); }
but when i enable ajax.. it skips this if statement and shows all the entries without the filter where clause.
The text was updated successfully, but these errors were encountered: