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

RadGrid MVVM error

5 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Emmanuel
Top achievements
Rank 1
Emmanuel asked on 22 May 2011, 07:41 PM
I'm just trying to make a RadGrid with WCF RIA with QueryableDomainServiceCollectionView etc to understand the logic. I'm getting the following error when trying to run my application .
{System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'Telerik.Windows.Controls.RadGridView' that matches the specified binding constraints threw an exception. [Line: 23 Position: 33] ---> System.MissingMethodException: Method not found: 'Void Telerik.Windows.Data.Selection.ItemSelectionHandler..ctor(Telerik.Windows.Data.DataItemCollection, Telerik.Windows.Data.Selection.ISelector, Boolean)'.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.InitializeSelection()
   at Telerik.Windows.Controls.DataControl..ctor()
   at Telerik.Windows.Controls.GridView.BaseItemsControl..ctor()
   at Telerik.Windows.Controls.GridView.GridViewDataControl..ctor()
   at Telerik.Windows.Controls.RadGridView..ctor()
   --- End of inner exception stack trace ---
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at TVSilverlightApplication.TVList.InitializeComponent()
   at TVSilverlightApplication.TVList..ctor()}

my XAML file looks like:

<navigation:Page x:Class="TVSilverlightApplication.TVList"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                 xmlns:SLA="clr-namespace:TVSilverlightApplication"
                 xmlns:TVList="clr-namespace:TVSilverlightApplication.ViewModel"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="TV List" DataContext="{Binding}" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
    <UserControl.Resources>
        <TVList:TVViewModel x:Key="TVViewModel"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" DataContext="{StaticResource TVViewModel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadGridView
            
            HorizontalAlignment="Left"
            Margin="10,10,0,0"
            Name="radGridView1"
            VerticalAlignment="Top"
            ItemsSource="{Binding Path=TVS}"
            SelectedItem="{Binding Path=currentTV}"
            AutoGenerateColumns="True"
             
            />
    </Grid>
</navigation:Page>
 my ViewModel si working correctly because i tried the same code to bind a RadCombobox and is working correctly. Apparently i miss some xmlns but which one? Any help would be greatly appreciated and i have to admit Telerik has done a beautiful job to facilitate the binding silverlight to server site.

5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 25 May 2011, 10:01 AM
Hi Emmanuel,

Unfortunately, we can't tell what is going on from the information that you have provided. It is something connected with selection and its initialization, but we cannot tell what it is.

If you can send us a sample project that reproduces this exception, we can debug it and see what is causing it.

Meanwhile, you can take a look at my blog post, in case you have not. There is a working sample project attached to the blog post, which you can use as a base.

I hope this helps.

Best wishes,
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
Emmanuel
Top achievements
Rank 1
answered on 25 May 2011, 03:17 PM
Thank you for your reply. I opened a ticket and attached the whole solution. looking forward to seeing a solution in order for me to continue learning working with Radgrid. thanks again
0
Rossen Hristov
Telerik team
answered on 25 May 2011, 03:42 PM
Hello Emmanuel,

Unfortunately, I could not find a support ticket that contains a sample project.

Best wishes,
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
Emmanuel
Top achievements
Rank 1
answered on 25 May 2011, 08:25 PM
I opened a ticket and I got a prompt reply. I might have telerik's  different version installed and in my project I have different version dll referenced . My question is How can I just use the last version? I just installed the last version, and start making a new solution. I never had to choose any references. is there a way to uninstall the old version? Thanks a lot for your help, and I will continue to check new features with RadGrid, MVVM, Silverlight etc.
0
Accepted
Rossen Hristov
Telerik team
answered on 26 May 2011, 08:00 AM
Hi Emmanuel,

Just un-install all old versions and make sure you have nothing on your PC left. Then install the latest version. This should be just like any other product. To be extra sure, you can see what the Project References show. Each assembly will show its version and all of them should be the same. That's all.

Best wishes,
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
Tags
GridView
Asked by
Emmanuel
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Emmanuel
Top achievements
Rank 1
Share this question
or