Posted 20 November 2018, 1:48 am EST - Updated 4 October 2022, 12:10 am EST
Stopwatch sw = new Stopwatch();
sw.Start();
this._fg.Rows.Clear();
var tsCleared = sw.Elapsed;
for (int j = 0; j < NUM_ROWS; j++) {
this._fg.Rows.Add(new Row());
}
this.txtStatus.Text = $"Grid cleared in {tsCleared.TotalMilliseconds}ms, " +
$"{this._fg.Rows.Count} rows with {NUM_COLUMNS} columns initialized in {sw.Elapsed.TotalMilliseconds}ms";
When the above function is called more than once the execution time exceeds by factor 3 - 4 (Tested using Win7 and Win10 with latest C1 library). In advance im missing AddRange in C1.WPF.FlexGrid.RowCollection. Please find C# demo application attached