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

TOPIC:

'Selected' value in filter combobox 13 Nov 2011 14:18 #486

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
My database contains several thousand entries and I have several filters which break the table into much smaller selections. When I show the initial collection it often times out as it tries to show every line. I would like to set the 'Selected' value on the filter combo to the first item in the list and prevent the default null value from being selected.

Is there an option to do this? (in the class for the combobox perhaps, I looked but couldn't find it)

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

Re: 'Selected' value in filter combobox 14 Nov 2011 10:25 #489

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
There are no options for this.

You have to do it by yourself.
In the controller, or in the model.

You can also define the menu link for this page with an url suffix :

&filter_myfield=my_value
Coding is now a piece of cake

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

Re: 'Selected' value in filter combobox 14 Nov 2011 11:04 #492

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
Thanks for that, I will give it a try.

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

Re: 'Selected' value in filter combobox 14 Nov 2011 20:52 #501

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
The URL filter worked a treat, thanks.

admin wrote: There are no options for this.

You have to do it by yourself.
In the controller, or in the model.

You can also define the menu link for this page with an url suffix :

&filter_myfield=my_value

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

Re: 'Selected' value in filter combobox 17 Nov 2011 12:24 #528

  • twev
  • twev's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 62
  • Thank you received: 15
A suggestion for the future - If the 'Null value label' for the combo box in a filter is set to 0 (zero) then fill the combo box with values but remove the show all value at the top of the list. Or better still have a check box to to do this perhaps.
Without this I think people will wonder why their component no longer works when their database grows. Mine has 4,500 records and without the filter I just get a blank screen.
Thanks
Trevor

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

  • Page:
  • 1
Time to create page: 0.060 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started