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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.