protected override int GetScrollColumns(int displayWidth) { int currentWidth = 0; int scrollCols = 0; //Remove the fixed columns from the scrollable area for (int f = 0; f < ActualFixedColumns; f++) displayWidth -= Columns.GetWidth(f); //Calculate the columns to be scrolled for (int c = Columns.Count - 1; c >= ActualFixedColumns; c--) { currentWidth += Columns.GetWidth(c); if (currentWidth > displayWidth) return Columns.Count - scrollCols; scrollCols++; } return 0; }