PDA

Click to See Complete Forum and Search --> : Expandable Grid


Cin0s3
Jun 11th, 2003, 01:33 PM
I use this function for expanding and contracting hidden rows in my grid, is there anyway I can use this function to setup an expand all button


Private Sub Dg_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dg.ItemCommand
Select Case e.CommandName
Case "Expand"
Dim ExpandedContent As PlaceHolder = e.Item.Cells(dg.Columns.Count - 1).FindControl("ExpandedContent")
ExpandedContent.Visible = Not ExpandedContent.Visible


Dim btnExpand As ImageButton = e.Item.Cells(0).FindControl("btnExpand")
If btnExpand.ImageUrl = "~/Images/Plus.gif" Then
btnExpand.ImageUrl = "~/Images/Minus.gif"
Else
btnExpand.ImageUrl = "~/Images/Plus.gif"
End If
End Select