How to include vertical line to GridPanel?

  • My user want to include vertical line to GridPanel.

    I have found this thread:

    http://extjs.com/forum/showthread.php?t=14211

    But still do not know how to do it.

    Can anyone help? Thanks in advance.


  • Can you specify cls: something for your instance and then provide css rules like above?
    .something .x-grid3-col {


  • Let's not confuse FAQ maintenance with knowledge/use of any particular area... ;)

    Haven't used this one myself. I recall seeing the problem with others though. Your screenshot doesn't really show, but is it a constant difference the columns are off, or does it grow as you go across the columns (perhaps growing by 1 px?).


  • Let's not confuse FAQ maintenance with knowledge/use of any particular area... ;)
    Fair comment :)

    Excuse me, I was being v. lazy.. I have success with the following:


    /* Override standard grid styles (add colour to vertical grid lines) */
    .x-grid3-col {
    border-left: 1px solid #EEEEEE;
    border-right: 1px solid #D2D2D2;

    }

    /* Also remove padding from table data (to compensate for added grid lines) */
    .x-grid3-row td, .x-grid3-summary-row td {
    padding-left: 0px !important;
    padding-right: 0px !important;
    }


  • Thanks, it work!


  • http://extjs.com/learn/Ext_FAQ_Grid#Adding_border_lines_to_cells_in_grid


  • http://extjs.com/learn/Ext_FAQ_Grid#Adding_border_lines_to_cells_in_grid

    Michael, Have you had much success with that method - I've not seen a method yet that doesn't misalign the columns and the cells.

    fangzhouxing, how are you getting on - any misalignment for you?

    This is the issue I have:

    9534


  • @mjlecomte,thank you very much! Now I can turn on vertical line only on some gridPanel by add config item:

    cls : 'vline-on'


    and the css change to :

    /* Override standard grid styles (add colour to vertical grid lines) */
    .vline-on .x-grid3-col {
    border-left: 1px solid #EEEEEE;
    border-right: 1px solid #D2D2D2;
    }

    /* Also remove padding from table data (to compensate for added grid lines) */
    .vline-on .x-grid3-row td, .x-grid3-summary-row td {
    padding-left: 0px !important;
    padding-right: 0px !important;
    }


  • Another question: Can I turn on vertical line only on some gridPanel (not all)?







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about How to include vertical line to GridPanel? , Please add it free.

    7 January 2009 | cameltoepants.com | edit