protected internal void RecalcWidthCache()
{
int total = 0;
int visibleWidth = 0;
int visibleCount = 0;
int lastVisible = -1;
for (int i=0; i<this.Count; i++)
{
total += this[i].Width;
if (this[i].Visible)
{
this[i].X = visibleWidth;
visibleWidth += this[i].Width;
visibleCount++;
lastVisible = i;
}
}
this.totalColumnWidth = total;
this.visibleColumnsWidth = visibleWidth;
this.visibleColumnCount = visibleCount;
}