The call in the condition should be LoadAttributesGridview() – Sorry, I should have edited before posting.