Custom Styling for Wicegrid 3.0.4

223 views Asked by At

I am using wicegrid 3.0.4 with rails 3. I want to do a custom styling.

I added

":html => {:style => 'text-align: center'} or html: {style: 'text-align: center'}" 

as:

g.column :column_name => "Name", :attribute_name => 'name', html: {style: 'text-align: center'}

It gives me "Unknown key: html"

How can I add custom styles or classes?

1

There are 1 answers

0
Avi On

Ok got the answer in the docs for wicegrid 3.04 Wicegrid 3.04 Doc

Have to write as:

g.column :column_name => "Name", :attribute_name => 'name', :td_html_attrs => {:style => 'text-align: right'}

Instead of html:, need to write :td_html_attrs