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

To open new screen with Context Menu

1 Answer 70 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Parul
Top achievements
Rank 1
Parul asked on 03 May 2011, 08:39 AM
Hi All,

i am using Wpf 4.0 and PRISM for my dot net application (Visual Studio 2010).

I have one requirement that I have to open a new screen (View) on the click of one of the items of context menu.
I have written the following code for it in my XAML :
<framework:RTPOGridView Grid.Row="1"
         x:Name="orderList" Margin="7,0,7,0"
         VerticalAlignment="Stretch" ItemsSource="{Binding dailyload}" >
                 <telerik:RadContextMenu.ContextMenu>
  
                    <telerik:RadContextMenu x:Name="ViewErrorsContextMenu" IsEnabled="True" >
                        <telerik:RadContextMenu.Items>
                        <telerik:RadMenuItem Header="View Errors" x:Name="itemViewErrors" IsEnabled="True" Command="{Binding Path=ViewErrorsCommand}" >
                                  
                            </telerik:RadMenuItem>
                       </telerik:RadContextMenu.Items>
                    </telerik:RadContextMenu>
  
  
                </telerik:RadContextMenu.ContextMenu>
  
  
            <framework:RTPOGridView.Columns>
                <telerik:GridViewDataColumn  Header="Customer" DataMemberBinding="{Binding CustomerPerson}" Width="*" />
                <telerik:GridViewDataColumn  Header="Product" DataMemberBinding="{Binding Product}" Width="*" />
                        </framework:RTPOGridView>

 

 

and the code which i wrote for it in View Model is as follows.

public void OnViewErrorsCommand(object sender, RoutedEventArgs e)
        {
            _dialogController.ShowDialog(_moduleController, ApplicationConstants.OrdersViewNames.ViewErrors);         
  
        }
Where "ViewErrors" is my new screen need to be opened on the click of the context menu.

kindly let me know the solution.

Thanks in advance !!!!!!!

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 09 May 2011, 08:39 AM
Hi Parul, 


Please, refer to our online documentation:

I hope this helps.


Best wishes,
George
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
ContextMenu
Asked by
Parul
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or