Kenny Devorak
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
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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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>
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>
ASKER