Hi All,
I am using RadGridView with MVVM binding. I am pulling large amount of data i.e.5000 records from database so used BackgroundWorker for data processing.
In RunWorkerCompleted event i am assigning data to ObservableCollection which is my grid's ItemsSource.
Everything works well except rowindicator, it's not visible if i bind data in worker completed event.
If i remove background worker and execute process on main thread then rowindicator displayed on grid.
Here is my sample code;
public ObservableCollection<Assets> AssetDs { get; set; } = new ObservableCollection<Assets>();
private voids search()
{
BackgroundWorker bw = new BackgroundWorker();
bw.DoWork += (sender, e) =>
{
e.Result = //DB call to fetch records
};
bw.RunWorkerCompleted += (sender, e) =>
{
List<Asset> result = (List<Asset>)e.Result;
result.ForEach(a => AssetDs.Add(a));
}
bw.RunWorkerAsync();
}
Any help would be appreciated,
Prashant