-
Notifications
You must be signed in to change notification settings - Fork 24
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
Virtual Property sorting #69
Comments
You can use Or you could go without server-side processing so DataTables will order on the client. However this is a global option, not per-column. |
Ok thanks for the quick reply! I'll try those! |
Recently I came across this same problem of searching a ordering by virtual fields in DataTables. I'll let a code example for anyone having problems with this. Basically you pass a custom finder to the datatablesComponent with the options delegateSearch and delegateOrder on true like this: Then you take the globalSearch and customOrder from the options array and do whatever query you want |
Hello!
First of all great plugin! Loving it so far. But I have a question that I couldn't find an answer for;
Is there any way I can order the columns by virtual properties?
Currently I have created methods for virtual properties (that I don't need to store in my DB, only show in my table ie. total price of products) that work great but once I try to order the columns it gives me an error
Unknown column 'price_total' in 'order clause'
since the column doesn't exist in my DB only in the virtual field.Thanks in advance!
The text was updated successfully, but these errors were encountered: