/// <summary> /// AutoSize the columns based on the visible range and autosize the rows based on it's contents. /// </summary> public override void AutoSizeCells() { Columns.AutoSizeView(); for (int i = 0; i < Rows.Count; i++) { Rows.AutoSizeRow(i); } }
/// <summary> /// AutoSize the columns based on the visible range and autosize the rows based on the first row. (because there is only one height available) /// </summary> public override void AutoSizeCells() { Columns.AutoSizeView(); if (Rows.Count > 1) { Rows.AutoSizeRow(1); } else if (Rows.Count > 0) { Rows.AutoSizeRow(0); } }