Last Updated:
06 Jan 2025 08:23
by ADMIN
A memory leak occurs when trying to clear and add new data inside Columns property of RadDataGrid
In a scenario with dynamic removing and adding of columns, there is a memory leak when clearing the columns by invoking the Clear() method of the columns collection.
A work-around is to remove the columns one by one:
for (int i = this.dataGrid.Columns.Count - 1; i >= 0; i--)
{
this.dataGrid.Columns.RemoveAt(i);
}