N
Nick Foster
I have a repeater I have bound to a custom collection of TicketLogEntries.
If a TicketLogEntry is marked as private and the user is not an
administrator, then the Item is hidden (code below).
The question is: if I set an item's or alteratingitem's Visible property to
False, can I also hide the accompanying Separator? It's a bit of a giveaway
that records are invisible if the separator is still showing
Private Sub rptrLog_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptrLog.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Dim bPrivate As Boolean = CType(e.Item.DataItem,
TicketLogEntry).IsPrivate
If bPrivate AndAlso HttpContext.Current.User.IsInRole("Administrator")
= False Then
e.Item.Visible = False
End If
End If
End Sub
Thanks,
Nick
If a TicketLogEntry is marked as private and the user is not an
administrator, then the Item is hidden (code below).
The question is: if I set an item's or alteratingitem's Visible property to
False, can I also hide the accompanying Separator? It's a bit of a giveaway
that records are invisible if the separator is still showing
Private Sub rptrLog_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptrLog.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Dim bPrivate As Boolean = CType(e.Item.DataItem,
TicketLogEntry).IsPrivate
If bPrivate AndAlso HttpContext.Current.User.IsInRole("Administrator")
= False Then
e.Item.Visible = False
End If
End If
End Sub
Thanks,
Nick