I'd like to remove all columns from my grid at run-time and completely rebuild it. I can't do:
foreach (var column in GridQueue.Columns)
{
GridQueue.MasterGridViewTemplate.Columns.Remove(column);
}
because the Remove changes the iteration and it throws "Collection was modified; enumeration operation may not execute."
Suggestions? thanks.
-John
foreach (var column in GridQueue.Columns)
{
GridQueue.MasterGridViewTemplate.Columns.Remove(column);
}
because the Remove changes the iteration and it throws "Collection was modified; enumeration operation may not execute."
Suggestions? thanks.
-John