<telerik:GridViewDataColumn DataMemberBinding="{Binding WeeklyUsage}" Width="84" DataFormatString="{}{0:F2}" IsVisible="{Binding IsColumnVisibleToCustomer, Source={StaticResource PFOViewModel}}" IsReadOnly="True" TextAlignment="Right" HeaderTextAlignment="Center"/> public bool IsColumnVisibleToCustomer { get { return !WebContext.Current.User.IsInRole("Customer"); } } public bool IsInRole(string role) { if ((this.Roles == null)) { return false; } return global::System.Linq.Enumerable.Contains(this.Roles, role); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)