On Oct 19, 3:20 pm, bill walton <bwalton...@gmail.com> wrote: > On Sun, 2009-10-18 at 12:01 -0700, Yuri Leikind wrote: > > Hello all, > > > WiceGrid plugin version 0.5 is released. > > > WiceGrid is a Rails grid plugin. > > > A list of changes:http://leikind.org/2009/10/18/wicegrid-version-0-5 > > Examples online:http://grid.leikind.org/ > > Homepage:http://leikind.org/pages/wicegrid > > Source code:http://github.com/leikind/wice_grid/tree/v0.5 > > > Best regards, > > Yuri Leikind > > This looks very nice. The documentation and examples are as impressive > as the demonstrated functionality. Very well done!
Thanks! > If I understand correctly, I can put more than just a single attribute > value in a column. For example, assuming I have separate columns in the > database for customer name, address, and phone number, I can put all of > them in one display column. Yes? Yes > > Is it possible to do that AND to still have the ability to sort the grid > based on that column? On just one column, yes. What you have inside the column block technically doesn't have to do anything with how you filter/order, etc, so you can have the following: g.column :attribute_name => 'firstname' do |person| person.firstname + ' ' + person.lastname + ' ' + person.telephone end > Is it possible to specify one of the elements I > put in a column as the one to use for sorting? So that I could put > name, address, and phone in the column, but sort/filter on name only? Yes. In the column clause you define the column you want to filter by, and then you redefine which column you want to use for ordering using :custom_order. see the example at http://grid.leikind.org/custom_ordering2, controller code, or here http://grid.leikind.org/custom_filters2 . Basically, the key of the hash is the database column defined in your column clause, and the value is any other column you want to use for ordering, or any valid sql expression (see here http://grid.leikind.org/custom_ordering, controller code) Best regards, Yuri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---