Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
605
How to remove vertical borders between rows in grid
posted

Hi,

i want to remove vertical borders between rows and set horizontal borders 

  • 34510
    Verified Answer
    Offline posted

    Hi ueldeep,

    By default vertical borders are already not visible.  The only border you should see should be the one between rows, the horizontal borders.  Do you actually mean the reverse?  You want to hide horizontal borders and show vertical ones?

    If so you can hide the horizontal borders by setting the row separator height to 0.  igGridView.setRowSeparatorHeight(0)

    Getting vertical borders to show up is a bit trickier.  The background color of the grid needs to be set to Black and then the cell background color needs to be set to White.  By default the cell background is Transparent so the grid's background will show through if you don't set it.  The only way I have found to do this though is by creating a custom column definition and overriding the getCell method.  When creating the cell in this method, set the background color to white here.  Once these colors have been set, set the column spacing to 1.  igGridView.setColumnSpacingWidth(1)