This is a migrated thread and some comments may be shown as answers.

Grouping Gridview

1 Answer 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Xaria D
Top achievements
Rank 1
Xaria D asked on 15 Dec 2010, 04:01 AM
I have a GridView, and a Treeview in my application.
The Gridviews itemsource is binded to a wcf method call. After the grid view is populated, the gridview is grouped and the treeview is loaded with count of groupitems.

I wanted to move this to another thread, as it takes some time for the grid to populate. So I added a background worker. But I run into exception
"The calling thread cannot access this object because a different thread owns it."

Why is that so?

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 15 Dec 2010, 08:19 AM
Hello,

 You cannot access objects across threads. If you want to execute something in the UI thread you should use Dispatcher. 

Kind regards,
Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Xaria D
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or