Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

How to setup default order in grid 19 Jul 2013 21:04 #10532

Greetings, I hope someone can help me, I tried many times but not working, I want to order by default that featured all = yes be the first.
the builder I created the column featured with property sortable
This will be the home of my web but always displays first featured = no.
Any Idea?

Please Log in or Create an account to join the conversation.

How to setup default order in grid 19 Aug 2013 21:32 #10847

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Did you found your answer ?

EDIT : The solution below :

use the states vars.
in your concerned view :
$model->setState('list.ordering', 'a.yourfield');
$model->setState('list.direction', 'desc');
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

How to setup default order in grid 19 Aug 2013 21:39 #10848

No, can you help me?

Please Log in or Create an account to join the conversation.

How to setup default order in grid 19 Aug 2013 21:43 #10850

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Did you saw ?
I have edited and answered to you.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

How to setup default order in grid 19 Aug 2013 23:01 #10859

sorry did not see it, thank you very much, I hope I have caused you discomfort.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.221 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started