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

Parameter count mismatch, Debug tips wanted

3 Answers 425 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 2
Martin asked on 25 Mar 2013, 04:32 PM
System.Reflection.TargetParameterCountException was caught
  HResult=-2147352562
  Message=Parameter count mismatch.
  Source=mscorlib
  StackTrace:
       at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
       at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.CollectPropertyValues(IEnumerable`1 items, List`1 propertyInfoValues, PropertySetPropertyInfo propertyInfo) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 114
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.DeterminePropertyValuesBase(IEnumerable`1 items) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 102
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel.DeterminePropertyValues(IEnumerable`1 items) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 91
       at Telerik.Windows.Controls.Data.PropertyGrid.PropertySetViewModel..ctor(IEnumerable`1 items, PropertySetOperation operation) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\PropertySetViewModel.cs:line 56
       at Telerik.Windows.Controls.RadPropertyGrid.RebindPropertyDefinitions(RadPropertyGrid propertyGrid) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\RadPropertyGrid.cs:line 770
       at Telerik.Windows.Controls.RadPropertyGrid.<>c__DisplayClass7.<OnItemPropertyChanged>b__5(Object s, NotifyCollectionChangedEventArgs e) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\PropertyGrid\RadPropertyGrid.cs:line 658
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
       at System.Collections.ObjectModel.Collection`1.Add(T item)
       at Propertydesigner.ViewModels.PropertyEditorViewModel.<.ctor>b__1(ObservableCollection`1 p) in d:\Projects\Source\eTray\Propertydesigner\Propertydesigner\ViewModels\PropertyEditorViewModel.cs:line 53
  InnerException:

I have only selected one object and it's the only one that PG chokes on until now everything works fine. 
Any debug tips?

3 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 26 Mar 2013, 07:05 AM
Hi Martin,

Will it be possible to provide a bit more details - how you define your property grid, what the source is ? Could you get the same behavior on our demos ? What version of RadControls are you working with ?
Generally, any relevant information or code-snippets would be helpful.

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Martin
Top achievements
Rank 2
answered on 26 Mar 2013, 11:18 AM
OK I found the nasty cat

Replace:

public Row this[int rowIndex] { get { return _rows[rowIndex]; } }

With this:
[Browsable(false)]
 public Row this[int rowIndex] { get { return _rows[rowIndex]; } }
0
Ivan Ivanov
Telerik team
answered on 29 Mar 2013, 01:26 PM
Hi,

 Thank you for reporting this issue to us. The exception will be fixed with the incoming service pack.

All the best,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PropertyGrid
Asked by
Martin
Top achievements
Rank 2
Answers by
Maya
Telerik team
Martin
Top achievements
Rank 2
Ivan Ivanov
Telerik team
Share this question
or