View Full Version : Padding in grid cells when using templates ( how to remove it ?) ...

2 Dec 2010, 2:55 PM

I am trying to reduce the padding around the template in a cell of grid, however cannot find setting to do so.

Any pointer will be greatly helpful.



3 Dec 2010, 4:52 AM
It's all css.

Poke it with Firebug and see which css rules are setting the <td> and inner <div> padding. Then add css rules that override this padding specifically for your grid cells.

6 Dec 2010, 3:26 PM
I was able to solve the problem with this approach

var el = p.getEl();
var parent = el.parent();
var dom = parent.dom;
var childNodes = dom.childNodes;

The childNodes[0] is the text node remaining due to '' being returned by renderer...

renderer: function(value, metaData, record, rowIndex, colIndex, store) {
.............//using panel as cell renderer

return '';

Please let me know if there is a better way to solve this. I could not get it to work by changing padding/ margin etc in all kinds of css attributes in div/td etc..

6 Dec 2010, 3:27 PM
Thanks. I did manage to solve it...