I am having a problem deleting an item from an EditableRootListBase in a grid with a delete button. When I tried it in the Rolodex example I get the same error. The error is in the InvokeMethod.cs, specifically the CallMethod method. Below is the error I receive:
NotSupportedException was unhandled by user code
Method to be executed must have 0 or 2 parameters.
Here is the Exception detail:
System.NotSupportedException was unhandled by user code
Message="Method to be executed must have 0 or 2 parameters"
StackTrace:
at Csla.Silverlight.InvokeMethod.CallMethod(Object sender, EventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
InnerException:
I understand about the parameters, but things changed from 3.7.1 to 3.8.1 and 3.8.2b so I am not sure how to modify the button to get it to work. Here is the button as follows:
<Button x:Name="DeleteRank" Content="Delete"
DataContext="{Binding Source={StaticResource RanksData}}"
csla:InvokeMethod.MethodName="RemoveItem"
csla:InvokeMethod.TriggerEvent="Click"
csla:InvokeMethod.MethodParameter="{Binding}"
IsEnabled="{Binding Path=CanRemoveItem, Mode=OneWay}"/>
Please advise on how to fix this.
Keith
Any ideas on how to fix this? Just thought I would reply to bring it to the top of the list!
Thanks,
Keith
Copyright (c) Marimer LLC