i need to align cell text to right side.
{
xtype : 'numbercolumn',
dataIndex : 'lineAmount',
id : 'lineAmount',
header : 'Net Line amount',
sortable : true,
width : 150,
summaryType : 'sum',
css: 'text-align: rigth;',
summaryRenderer : Ext.util.renderers.summary.sum,
editor : {
xtype : 'numberfield',
allowBlank : false
}
adding align property does not work for me because it also aligns header text
There is a config present for numbercolumn
known as align
. just use that.
Whenever you are stuck refer the secha docs which is beautifully designed just for beginners.
I am assuming you are beginner and explaining you how to use docs.. for your clear understanding:
align: "right"
code in the below "code editor".Updated
.columnAlign{
text-align: right;
}
tdCls: "columnAlign",
As answered Mr_Green you can align the text to the right or left using align. For header to remain centrally aligned use css as :
.x-column-header-inner{
text-align:center;
}
Update :
.....//
{
xtype : 'grid',
cls : 'gridCss',
...//other configs
}
.....//
In your app.css file :
.gridCss .x-column-header-inner{
text-align:center;
}
In your index.jsp
<link rel="stylesheet" type="text/css" href="app/resources/css/app.css">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With