Current Filter:
Date Range: 5/21/2008
(clear
filters)
A few weeks ago I posted about needing to wrap text in a CFGRID's cell. (Read the original posted that I just updated...)
The code I provided didn't work in IE (figures!) but I've since added display:block;
to the rule and it works for me...
Here it is, new and improved:
div .x-grid-cell-text{white-space:normal;display:block;}
I'm interested in hearing if anyone has a better fix, or if this doesn't work right for some use case or browser.
Posted by ~Angela | Comments (2) | Add Comment | Permalink
Comment from PJ on 8/1/2008
Finally! I couldn't seem to get this to work for my html cfgrid but when I did this version I found online:
#myformid .x-grid-row td {white-space:normal;}
and added an ID to my cfform, it finally worked! Whew!!
Super, glad you got it working PJ! ~Angela
Comment from PJ on 8/1/2008
Hi Laura, I love your blog. Thanks so much for sharing so many great examples.
I'm only re-entering the coder world with CF8, having been doing only non-tech PM work for quite some time. I'm having a blast with the many features CF didn't have last time I was using it, but I'm hindered because--er, I'm an idiot, and re-learning stuff on the fly. ;-) I have two questions.
One, specific to this post: When I simply wrap my CFGRID section in a div with:
<.x-grid-cell-text{white-space:normal;display:block;} >
Nothing happens... by which I mean, I don't get any multi-row text wrap effect in my grid. What am I missing? There must be some way to apply this I am missing. If I can't get text to wrap in my html cfgrids I am just doomed.
The second thing is, most your examples use flash cfgrids/cfforms. When I apply them to my html cfgrids, the cfform item type=script part simply shows as text on the page and of course nothing works. Are all these examples ONLY workable in flash forms/grids, or is there a different way to implement that with html that I'm not finding so far?
Hugely appreciate any guidance here. I googled but nearly everything for a cfgrid wrap solution actually linked back to your site! ;-)
PJ
Hi PJ,
Looks like you've got me confused with someone else. I'm Angela and I don't use Flash forms as a general rule.
The code to fix the wrapping is CSS, so it needs to be inside a stylesheet. You can add the code to a CSS file that's linked to your document or embed the code in a STYLE tag in the HEAD of your document.
Hope that helps and good luck! ~Angela