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

    hey,
        is there a property that shows/Hides the grid's gridlines and I can change it in runtime?
    thank you
  2. Nikolay
    Admin
    Nikolay avatar
    1803 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.

    Regards,
    Nikolay
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top