vinu vinu - 1 month ago 16
Vb.net Question

Hide the expand button of Telerik RadGridView for WinForms

I have developed a RadGridView in WinForms and i need to hide or remove the expand button for all rows in the grid.

Please suggest me a solution. Any help is appreciated.

Answer

There is a collection of Templates in RadGridView which represents the hierarchy of the data source. If you would like to bring back to flat data source the RadGridView, you can just clear the Templates collection and the expand buttons for all rows will be removed.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Me.RadGridView1.Templates.Clear()
End Sub