Show/Hide Gridlines

2 posts, 0 answers
  1. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 04 Feb 2008 Link to this post

        is there a property that shows/Hides the grid's gridlines and I can change it in runtime?
    thank you
  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 06 Feb 2008 Link to this post

    Hi lamees,

    There are two approaches to hide RadGridView's gridlines, depending on what kind of borders to you want to hide:
    1. Cell border is the border around the cell itself and it can be hidden by subscribing to the CellFormatting event and then in the radGridView1_CellFormatting event handler put this line of code:
      e.CellElement.DrawBorder = false
    2. Border on a GridTableElement level can be hidden by using this code snippet:
      ((GridTableElement)radGridView1.GridElement).GridBorderWidth = 0; 
    Do not hesitate to contact us, if you have additional questions.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top