public void PopulateGroupsTable(List<ActivEarth.Objects.Groups.Group> groups, Color[] backColors, Color[] textColors)
{
this.userDetails = (User)Session["userDetails"];
int colorIndex = 0;
int textIndex = 0;
foreach (ActivEarth.Objects.Groups.Group group in groups)
{
_groupsTable.Rows.Add(MakeRowForTable(group, backColors[colorIndex], textColors[textIndex]));
colorIndex++;
if (colorIndex == backColors.Length)
{
colorIndex = 0;
}
textIndex++;
if (textIndex == textColors.Length)
{
textIndex = 0;
}
}
}