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

RadGridView.Items.Count.ToString() error...

2 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Marc Roussel
Top achievements
Rank 2
Marc Roussel asked on 06 Apr 2010, 02:11 PM
Hi,

In fact it's not really a problem but just a question about why things are like that :

if I do not reference System.Windows.Data, I get the error :

The type 'System.ComponentModel.IPagedCollectionView' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. C:\Users\Marc\Documents\Visual Studio 2010\Projects\Repro\Repro\MainPage.xaml.cs 30 13 Repro


When I try to get the count of the items from the grid like that :
string Count = Grid.Items.Count.ToString();
Does that mean I have to add a reference to System.Windows.Data just to have the count of the Items in the grid ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 06 Apr 2010, 02:15 PM
Hello Marc Roussel,

The Items property of the grid is of type DataItemCollection. This class implements several interfaces from the System.Windows.Data assembly. So you have to add a reference to this assembly.

Kind regards,
Ross
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Marc Roussel
Top achievements
Rank 2
answered on 06 Apr 2010, 02:29 PM
Thank you
Tags
GridView
Asked by
Marc Roussel
Top achievements
Rank 2
Answers by
Rossen Hristov
Telerik team
Marc Roussel
Top achievements
Rank 2
Share this question
or