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

3 posts, 1 answers
  1. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 06 Apr 2010 Link to this post

    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. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 06 Apr 2010 Link to this post

    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.
  3. DevCraft banner
  4. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 06 Apr 2010 Link to this post

    Thank you
Back to Top