Hi Raman,
The answer is very simple, you are trying to clear the MainDataGrid.Items outside of the UI thread.
You should change your code:
if (DealerCollection.Count() >= 0)
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
MainDataGrid.Items.Clear();
MainDataGrid.ItemsSource = DealerCollection;
lblError.Visibility = Visibility.Hidden;
}), DispatcherPriority.Background);
}</pre>