or
Hello Team,
We are upgrading the telerik controls to q2 2011 version. In the previous version the Radgridview right click contextmenu was working fine, but not now. What do I have to change in the below code to get the popup menu when I right click the selected row?
Let me know.
Thanks
<
telerik:RadGridView.ContextMenu
>
<
ContextMenu
IsVisibleChanged
=
"ContextMenu_IsVisibleChanged"
>
<
MenuItem
Header
=
"Export To Excel"
Command
=
"Commands:GlobalCommands.ExportGridToExcel"
CommandParameter
=
"{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}"
/>
<
MenuItem
Header
=
"Export To Word"
Command
=
"Commands:GlobalCommands.ExportGridToWord"
CommandParameter
=
"{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}"
/>
</
ContextMenu
>
</
telerik:RadGridView.ContextMenu
>
Telerik.Windows.ControlsSystem.Reflection.TargetInvocationException
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
System.TypeLoadException
Cannot find type Telerik.WinControls.Design.NewItemGlyph in module Telerik.WinControls.dll.
at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.MetadataReader.MetadataOnlyAssembly.GetType(String name, Boolean throwOnError)
at Microsoft.MetadataReader.MetadataOnlyModule.ResolveTypeRef(ITypeReference typeReference)
at Microsoft.MetadataReader.MetadataOnlyTypeReference.GetResolvedTypeWorker()
at Microsoft.MetadataReader.TypeProxy.GetResolvedType()
at Microsoft.MetadataReader.TypeProxy.GetHashCode()
at Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.GetTypeForReflectableType(Reflectable`1 reflectableType)
at MS.Internal.Metadata.ClrType.GetTypeMetadata(Type type)
at MS.Internal.Metadata.ClrType.get_BaseType()
at MS.Internal.Design.Metadata.Xaml.XamlType.<
GetAllAttachableProperties
>d__7.MoveNext()
at MS.Internal.Design.Metadata.Xaml.XamlType.<
FindAttachableProperties
>d__0.MoveNext()
at Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.<
FindAttachableProperties
>d__7.MoveNext()
at MS.Internal.VirtualModel.VirtualModelPropertyCollection.<
GetUncachedProperties
>d__0.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at MS.Internal.VirtualModel.VirtualModelPropertyCollection.GetEnumerator()
at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelPropertyMerger.<
GetFirstProperties
>d__0.MoveNext()
at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList)
at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader)
at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly)
at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle()
public
partial
class
MainWindow : Window
{
WomanEntities _container =
new
WomanEntities();
public
MainWindow()
{
InitializeComponent();
VirtualQueryableCollectionView view =
new
VirtualQueryableCollectionView(_container.Women.OrderBy(k => k.ID));
view.LoadSize = 20;
DataContext = view;
}
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
WomanEntities _container =
new
WomanEntities();
IQueryable<Woman> women = (from k
in
_container.Women
where k.Age == 60
select k);
foreach
(var item
in
women)
item.HairColor =
"white"
;
_container.SaveChanges();
((VirtualQueryableCollectionView)DataContext).Refresh();
}
}