hello every one
i have integrated the grid in my project . The grid works fine and is really helpful . But there is one thing which i dont know how to handel . In my project there is an function of sorting the records once we add it in the admin pannel of the site (Eg if i add 10 news record . The admin will have the right to decide which one will appear first second and third etc ). The gcocery crud i guess does not support sorting of records . can any one help me out with it how it can be achieved by grocery crud
Thanks


Sorting in the grid
Started by viraj, Jun 04 2012 11:32 AM
grid sorting sorting sorting functionality Grocery crud sorting enabling sorting in g crud
1 reply to this topic
#1
Posted 04 June 2012 - 11:32 AM
#2
Posted 05 June 2012 - 07:41 AM
The ordering can be done with http://www.grocerycr...ctions/order_by but this function uses data from the database to do the sorting.
so you would give a column and tell it to order_by('column', 'desc') or order_by('column', 'asc')
If you wanted to chose the order yourself would need to have an editable field in the table that would be the order_by value and it would be potentially bigO N every time you changed the order of 1 person
so you would give a column and tell it to order_by('column', 'desc') or order_by('column', 'asc')
If you wanted to chose the order yourself would need to have an editable field in the table that would be the order_by value and it would be potentially bigO N every time you changed the order of 1 person
Also tagged with one or more of these keywords: grid sorting, sorting, sorting functionality, Grocery crud sorting, enabling sorting in g crud
Support →
I have a question →
Sorting showing number 100 before number 1000Started by Juanma, 26 Sep 2019 ![]() |
|
![]() |
||
Support →
I have a question →
How do I disable Sorting for certain Columns of CRUD grid?Started by waqar, 11 Sep 2012 ![]() |
|
![]() |
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users