Results 1 to 4 of 4

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

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    68

    Default Padding in grid cells when using templates ( how to remove it ?) ...

    Hi.

    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.


    Thanks,

    Valsar..
    Attached Images Attached Images

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    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.

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Posts
    68

    Default

    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;

    dom.removeChild(childNodes[0]);

    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..

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Posts
    68

    Default

    Thanks. I did manage to solve it...

Similar Threads

  1. Remove tab panel padding
    By PCSpectra in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 24 Nov 2011, 2:00 PM
  2. Grid - How to remove padding for a specific Column
    By Bakul in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 24 Sep 2009, 6:56 AM
  3. Remove dirty triangle for specific cells
    By KRAN in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 21 Mar 2008, 3:26 AM
  4. [Solved] Remove Padding Inside Grid Cell for Image?
    By cluettr in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 31 Jul 2007, 5:56 PM
  5. Why remove all margin and padding?
    By JorisA in forum Community Discussion
    Replies: 6
    Last Post: 11 Jun 2007, 4:05 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •