I have create a table in the GroupHeaderTemplate.
I would like to access the table to hide it if the groupd is collapsed like:
<
GroupHeaderTemplate
>
<
table
style
=
"padding: 0px; margin: 0px; width: 100%; border-collapse: collapse;"
id
=
"tbl_GroupHeader"
>
<
tr
>
<
td
style
=
"width: 10px; text-align: center;"
>
</
td
>
<
td
style
=
"width: 40px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label1"
Text
=
"Account"
></
asp:Label
>
</
td
>
<
td
style
=
"text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label2"
Text
=
"Description"
></
asp:Label
>
</
td
>
<
td
style
=
"width: 60px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label3"
Text
=
"Date"
></
asp:Label
>
</
td
>
<
td
style
=
"width: 60px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label4"
Text
=
"Entity ID"
></
asp:Label
>
</
td
>
<
td
style
=
"width: 150px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label5"
Text
=
"MemberName"
></
asp:Label
>
</
td
>
<
td
style
=
"width: 70px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label6"
Text
=
"Debit"
></
asp:Label
>
</
td
>
<
td
style
=
"width: 70px; text-align: center;"
>
<
asp:Label
runat
=
"server"
ID
=
"Label7"
Text
=
"Credit"
></
asp:Label
>
</
td
>
</
tr
>
</
table
>
</
GroupHeaderTemplate
>
I would like to access the table to hide it if the groupd is collapsed like:
Protected
Sub
rgd_JournalEntries_ItemCommand(sender
As
Object
, e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
rgd_JournalEntries.ItemCommand
If
e.CommandName =
"ExpandCollapse"
Then
If
e.Item.Expanded
Then
For
Each
item
As
GridGroupHeaderItem
In
rgd_JournalEntries.MasterTableView.GetItems(GridItemType.GroupHeader)
TryCast(item.FindControl(
"tbl_GroupHeader"
), Table).Visible =
True
Next
Else
For
Each
item
As
GridGroupHeaderItem
In
rgd_JournalEntries.MasterTableView.GetItems(GridItemType.GroupHeader)
TryCast(item.FindControl(
"tbl_GroupHeader"
), Table).Visible =
False
Next
End
If
End
If
End
Sub
Or just hide the GroupHeaderTemplate itself if the group is collapsed
Thank you for any help.