I have a ranking system, I'm about to make a "sub-leader" rank. In that relation I am removing some pages/tabs, depending on the user access level.
This is the code I have. The problem is it does not remove all the pages. As shown in the screenshot attached, not all pages are removed.
for (int i = 0; i < radPageView2.Pages.Count; i++)
{
if(radPageView2.Pages[i].Text == "Emails" || radPageView2.Pages[i].Text == "Products" || radPageView2.Pages[i].Text == "Customers" || radPageView2.Pages[i].Text == "Verify sales" ||
radPageView2.Pages[i].Text == "Salary" || radPageView2.Pages[i].Text == "Leads control" || radPageView2.Pages[i].Text == "Agents")
{
radPageView2.Pages.RemoveAt(i);
}
}
Thanks in advance!