public void ShowRights(string userOrGroupId, string resourceId) { this.ResourceId = resourceId; this.UserOrGroupId = userOrGroupId; using (ResourceDataAccess resDataAccess = new ResourceDataAccess()) { grdVwPermission.DataSource = resDataAccess.GetUsersOrGroupPremissions( this.ResourceId, this.UserOrGroupId, userToken); grdVwPermission.DataBind(); } if (grdVwPermission.Rows.Count > 0) { this.Visible = true; } }