Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set grid row height in Extjs 4?

Tags:

extjs

extjs4

I use Ext.grid.Panel in my project, but I think the default row height is too large and I can't modify the row height, so the whole grid makes me feel uncomfortable.

However, I find the panel-grid example in Extjs-4 doc is quite good. In it the row height is adjusted to fit the words height.Thus the whole grid is very compact.

So I wonder how can I set the grid row height?

like image 208
Arthur Yoo Avatar asked Dec 22 '25 23:12

Arthur Yoo


1 Answers

One way you could change the row height is by using css. Each row uses padding along with the content for the height so if you were change the padding in this class it would make the row higher/lower:

.x-grid-cell-inner {
    overflow: hidden;
    padding: 3px 6px;
    white-space: nowrap;
 }

Also, you can take a look here:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.view.Table-method-getRowClass

like image 59
Zero Cool Avatar answered Dec 24 '25 20:12

Zero Cool



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!