Question: I dynamically change columns for a RadGrid, for some data sources I need AutoGenerateColumns for other I don't. But after data binding with AutoGenerateColumns=True I tried to clear Columns list and add new, but old autogenerated columns still there. There is an example on VB.NET of code for adding new column

```
reportGrid.AutoGenerateColumns = False
reportGrid.Columns.Clear()
Dim column As New GridBoundColumn
column .DataField = "field1"
column .HeaderText = "header1"
reportGrid.Columns.Add(column)

```

`Columns.Clear()` doesn't remove autogenerated columns, how can I remove them?
Thanks

Answer: 
You cannot access the UI thread from any other thread directly. So, Encose your UI access code in the Dispatcher.BeginInvoke()

```
Dispatcher.BeginInvoke(() =>
    {
        foreach (Button i in bts)
           i.Content = "";
    });

```
* Make use of **Background Worker**.

For *Windows Phone 8*: 
**<http://msdn.microsoft.com/en-us/library/windows/apps/cc221403(v=vs.105).aspx>**