optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
96 stars 46 forks source link

How do we add order by on php side ? #18

Closed ksubba closed 11 years ago

ksubba commented 11 years ago

I need to default SQL order to 'id desc' , now how do I do that ? That was easy on previous version, couldn't find about it on documentation either.

Please advice ? Kaushal

optikalefx commented 11 years ago

in the js just do

orderBy: "id",
sort: "desc"
ksubba commented 11 years ago

Thanks !

Kaushal

ksubba commented 11 years ago

Just a suggestions if it might help lot of folks like me. I think you need to create a example setup with big list of all parameters used (well commented) for both JS and PHP calls.

Example: http://jquery.malsup.com/cycle/options.html

Thx Kaushal

optikalefx commented 11 years ago

In the documentation, square-bracket.com/openjs go to the bottom and click "advanced". There are all your options.

Though what you sent me is just a copy and paste from their code - and all of my code is fully commented hence the "open" in openJS. So if you just pop open grid.js you get to see and read about all the nice options you have.

ksubba commented 11 years ago

Sure, just trying to add in with feedback so your already awesome product is easy for implementation to all the levels of programmers. While it's already easy enough I couldn't find the ordering option on documentation even on the advanced view.

Yeap reading the code is an option, but not quick way to find it out :)

Thanks Kaushal

optikalefx commented 11 years ago

my god you're right. Great catch!

ksubba commented 11 years ago

Sure buddy .. glad I could add something for the good :)

I am creating a PHP CRUD class by using openjsgrid and another awesome project: http://code.google.com/p/php-form-builder-class/

You both have embraced bootstrap open hearty which is a GREAT choice.

Keep up a great work.

optikalefx commented 11 years ago

Thanks! Glad you like the project, stay tuned for pushed updates