1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    5
    Vote Rating
    0
    pnguyen02 is on a distinguished road

      0  

    Default Unanswered: Problem with Wrap Text in Grid and Hiding Columns

    Unanswered: Problem with Wrap Text in Grid and Hiding Columns


    Hey,

    I am having this problem with wrap text on the grid. When I hide a column on the grid the rows expands(height) and makes the grid look nasty...

    I currently have a fix for it, but my problem is on the load of the page i still want the text to be wrapped on the grid column. With the fix if I hide and then show the columns then it works.

    my code:

    td.wrap div {
    white-space: normal;
    }


    function removeCls()
    {
    Ext.get(Ext.query('.placeholder')).removeCls('wrap');
    }

    function addCls()
    {
    Ext.get(Ext.query('.placeholder')).addCls('wrap');
    }


    var grid = Ext.create('Ext.grid.Panel', {
    columns : [{
    text : 'Hello',
    tdCls : 'placeholder',
    listeners: {'beforehide': removeCls, 'beforeshow': addCls}
    }]
    });


    Any suggestions?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,999
    Answers
    666
    Vote Rating
    456
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have a look at this thread:
    http://www.sencha.com/forum/showthread.php?237681/

    Assign the CSS to a specific column

    Scott.

Thread Participants: 1

Tags for this Thread