This question is locked. New answers and comments are not allowed.
Hi
I am attempting to create a ContextMenu on the header of a RadGridView. Using your demo I was able to go get the context menu attached and working.
However when I attempted to recreate this in my own solution it appeared that it did not work. After some investigation I found out that it was infact working... that is until the ItemSource property is set on the RadGridView, at which point the ContextMenu no longer shows, and the standard "Silverlight" option pops up instead.
I tested this theory with your Head ContextMenu demo.
by changing:
to this: (in effect, delaying the load of data until after the ContextMenu is setup)
I am attempting to create a ContextMenu on the header of a RadGridView. Using your demo I was able to go get the context menu attached and working.
However when I attempted to recreate this in my own solution it appeared that it did not work. After some investigation I found out that it was infact working... that is until the ItemSource property is set on the RadGridView, at which point the ContextMenu no longer shows, and the standard "Silverlight" option pops up instead.
I tested this theory with your Head ContextMenu demo.
by changing:
public Example()
{
this.InitializeComponent();
RadGridView1.ItemsSource =
new MyBusinessObjects().GetData(100);
}
to this: (in effect, delaying the load of data until after the ContextMenu is setup)
public Example()
{
this.InitializeComponent();
//RadGridView1.ItemsSource = new MyBusinessObjects().GetData(100);
this.Loaded += new RoutedEventHandler(Example_Loaded);
}
private void Example_Loaded(object sender, RoutedEventArgs e)
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
RadGridView1.ItemsSource =
new MyBusinessObjects().GetData(100);
}));
}
Is there a fix or work around for this issue?
~Michael