WiceGrid 3.6.0.pre4 examples

Most simple grid

The simplest grid is defined by the grid helper with column blocks inside for each column. The value of each column block is the contents of a cell.

  • # encoding: utf-8
    class Basics1Controller < ApplicationController
      def index
        @tasks_grid = initialize_grid(Task)
      end
    end
    
  • <%= grid(@tasks_grid) do |g|
    
      g.column do |task|
        task.id
      end
    
      g.column  do |task|
        task.title
      end
    
      g.column do |task|
        task.description
      end
    
      g.column do |task|
        task.archived? ? 'Yes' : 'No'
      end
    
      g.column do |task|
        task.created_at.to_s(:short)
      end
    
      g.column do |task|
        link_to('Edit', edit_task_path(task))
      end
    end -%>
    
  • .well
      %h2= current_page_title
      %p
        The simplest grid is defined by the
        %code grid
        helper with column blocks inside  for each column.
        The value of each column block is the contents of a cell.
    
    = show_code
    
    .row-fluid
      .col-md-12
        = render   'grid'
101-120 / 500 Alle rijen tonen
101enim ullamTenetur nihil animi provident.No03 Jun 12:37Edit
102inventore eligendi voluptasOdio autem at officia tempora labore.No11 Jun 12:37Edit
103molestiaeLaborum sapiente rerum sit.No08 Jun 12:37Edit
104autemMinima consequatur explicabo deleniti iusto officiis debitis doloremque rerum.No06 Jun 12:37Edit
105autem quiaVelit voluptas impedit officia illo eveniet ullam.Yes09 Apr 12:37Edit
106laboriosam enimVel laborum similique est voluptatem dolor cupiditate.No18 Jun 12:37Edit
107utInventore saepe voluptatibus voluptas dignissimos omnis molestias quisquam.No02 Apr 12:37Edit
108maximeItaque nisi fugiat et molestiae dolorem voluptas.No21 May 12:37Edit
109sit amet fugiatVoluptatem nam dolores numquam quisquam.No03 Apr 12:37Edit
110hicVoluptate quia quo sed.No11 May 12:37Edit
111sit eaCulpa numquam dolorem corporis corrupti aliquam.Yes03 Jun 12:37Edit
112neque quiAut ipsa aut accusamus quia consequatur ea facilis.No05 Apr 12:37Edit
113exercitationemExplicabo ratione quidem non sunt quibusdam rerum et.No02 Apr 12:37Edit
114dolores liberoId quis dolor natus.No08 Jun 12:37Edit
115sit et estUllam dolorum dolorem placeat doloribus aut ea consequatur.No16 Mar 12:37Edit
116dolorem consecteturNemo voluptate quo cum natus ut dolorum maxime consequuntur.No17 May 12:37Edit
117fugitSunt ab optio illo voluptatem adipisci omnis ut earum.No02 Apr 12:37Edit
118hicDolores voluptatem nobis repudiandae consequatur fugiat autem voluptas.No25 Mar 12:37Edit
119quo est aliquidFugiat reprehenderit est quia ducimus voluptatem maiores tempore id.No19 May 12:37Edit
120esse voluptas deseruntFugit error sed id rem doloribus.No07 May 12:37Edit

Fork me on GitHub