For the GridView to work with the code in the link you provided you need, at minimum, the following settings.
<asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Root">
<ItemTemplate>
<asp:Button ID="MinBT" runat="server" CommandName="_Hide" Text="-" />
<asp:Button ID="PluseBT" runat="server" CommandName="_Show" Text="+" Visible="false"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>