1. #1
    Ext JS Premium Member
    Join Date
    Jun 2011
    Posts
    33
    Vote Rating
    0
    psewt is on a distinguished road

      0  

    Default ExtJS4 Grid - whats the config for disabling lines between rows and different color?

    ExtJS4 Grid - whats the config for disabling lines between rows and different color?


    ExtJS4 Grid - what's the config for:
    1. disabling lines between rows, meaning no lines between rows, like white background with no lines?
    2. each row with the same background color, like white every row, no fancy grey colors and stuff like that?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    7,183
    Vote Rating
    194
    scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold scottmartin is a splendid one to behold

      0  

    Default


    You might have to create a CSS class for this to override the default.
    Have a look at x-grid3-* in the element inspector.

    Regards,
    Scott.

  3. #3
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    644
    Vote Rating
    3
    carol.ext is on a distinguished road

      0  

    Default


    Did you try using stripeRows ?

    from API for View :

    Code:
    Ext.create('Ext.grid.Panel', {
        // other options
        viewConfig: {
            stripeRows: false
        }
    });

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2009
    Posts
    309
    Vote Rating
    2
    azuroff will become famous soon enough

      0  

    Default


    As Carol mentioned, stripeRows: false will tell Ext not to highlight every other row, and the following CSS declarations should get rid of the lines between the rows and columns:

    Code:
    .x-panel-with-col-lines .x-grid-row .x-grid-cell {
        border-right-style:  none !important;
    }
    
    .x-grid-row .x-grid-cell {
        border-style:  none !important
    }
    Just be sure you put those in a css file that gets loaded after the ExtJS css files.