Link to home
Start Free TrialLog in
Avatar of Kenny Devorak
Kenny DevorakFlag for United States of America

asked on

Adjusting how a cell handles text in CFGrid

I attached my CFGrid below.  What I want to know is.  Can you change a column to wrap text.

Right now my text in a colum looks like:
here is the examp.....

I would like it to look like:
here is the
example
<cfform name="CouponForm">
              <cfgrid format="html" name="parkGrid" pagesize="5" width="585" selectmode="row" bind="cfc:listCoups.getParks({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
                <cfgridcolumn name="Cid" header="id" display="no">
                <cfgridcolumn name="businessName" width="155" header="Business Name" href="detailcoupon.cfm" hrefkey="id"/>
                <cfgridcolumn name="cDescription" width="230" header="Coupon" />
                <cfgridcolumn name="city" width="80" header="City" />
                <cfgridcolumn name="NEWexpDate" width="120" header="Exp Date" />
              </cfgrid>
            </cfform>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kenny Devorak
Kenny Devorak
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kenny Devorak

ASKER

I searched everywhere for this.  I seen a lot of people asking on here with no help at all.  Here is the answer.
Avatar of medsoos
medsoos

You can do it with CSS as shown here:

http://www.webtrenches.com/post.cfm/quick-and-easy-column-alignment-for-cfgrid

Put the style above your grid. Just add white-space: normal to the CSS to wrap.


<style type="text/css">
    .x-grid-col {text-align:right;}
    .x-grid-col-0 {text-align:right; white-space:normal;}
    .x-grid-col-1 {text-align:left; white-space:normal;}
    .x-grid-col-2 {text-align:left;}      
</style>