<p>My scenario is:</p>

<p>I have a WPF Window with 3 data-bound text boxes</p>

<pre class="lang-xml prettyprint-override"><code>SettingsUI : Window

&lt;Grid Name="SettingsUIGrid1"&gt;
    &lt;TextBox Text="{Binding val1}" ....
    &lt;TextBox Text="{Binding val2}" ....
    &lt;TextBox Text="{Binding val3}" ....
&lt;/Grid&gt;
</code></pre>

<p>In the constructor I do this:</p>

<pre><code>SettingsUIGrid1.DataContext = coll[0]; // collection first value
</code></pre>

<p>When the Cancel button is clicked, I close my window:</p>

<pre><code>private void btnCancel_Click(object sender, RoutedEventArgs e) {
Close();
}
</code></pre>

<p>When I click the Show button, is shows values from the DB in text boxes, if user changes a text box value, and reloads the window the new value is displayed not the old one.  Can someone suggest what to do to reload the values again and clear the in memory object?</p>

I would suggest putting some code into your cancel button click event to check whether any of the data has been changed from what was initially loaded as I am assuming that if they don't click cancel the other button would be save/ok meaning that the data would be committed to the database.
What is coll?
if it is a DataTable then you could use this:
```
```
private static bool DataRowReallyChanged(DataRow row)
    {
        if (row == null)
        {
            return false;
        }

        if (!row.HasVersion(DataRowVersion.Current) || (row.RowState == DataRowState.Unchanged))
        {
            return false;
        }

        foreach (DataColumn c in row.Table.Columns)
        {
            if (row[c, DataRowVersion.Current].ToString() != row[c, DataRowVersion.Original].ToString())
            {
                return true;
            }
        }

        return false;
    }
```
```
then simply add a call into the cancel button event like:
```
```
if (DataRowReallyChanged((DataRow)SettingsUIGrid1.DataContext))
{
     ((DataRow)SettingsUIGrid1.DataContext).RejectChanges();
}
```
```
I hope this helps. If you are not using a DataTable then let me know what you are using and ill see if i can help further.