This is a migrated thread and some comments may be shown as answers.

How do I remove the hierarchy child border?

2 Answers 183 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Henri
Top achievements
Rank 1
Henri asked on 13 Dec 2010, 01:21 PM
Hi,

I'm using the 2010 Q3 release and I am trying to remove the thick border around a hierarchy child grid.
I'm not trying to change the size, just remove the thick border.
I've read several threads, but none work or answer my question.  Most threads assume there is a ChildTableElement.TableBodyElement
but there is no such object.
Now how do I get rid of this thick border, without having to define a Theme?

Best regards,

Henri

2 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 13 Dec 2010, 02:01 PM
Hi Henri, 

The easiest way is to just drop the padding of the cell. Please consider the following code
Private Sub GridView_ViewCellFormatting(ByVal sender As Object, _
ByVal e As CellFormattingEventArgs) Handles RadGridView1.ViewCellFormatting
 
    If TypeOf e.CellElement Is GridDetailViewCellElement Then
        Dim cell As GridDetailViewCellElement = TryCast(e.CellElement, GridDetailViewCellElement)
        cell.Padding = New Padding(0)
    End If
End Sub

hope that helps
Richard
0
Henri
Top achievements
Rank 1
answered on 13 Dec 2010, 02:15 PM
Thank you Richard, that solved my problem :)
Henri.
Tags
GridView
Asked by
Henri
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Henri
Top achievements
Rank 1
Share this question
or