I am currently evaluating your silverlight controls (in vs2010). So far so good, but I have ran into a problem I can't seem to crack:
I have a RadGridView inside a RadWindow and I am trying to open a RadContextMenu on right click of the GridViewRow. It never opens. I have followed the online demo and searched online for a solution to this.
My xaml looks like this:
<
telerikNavigation:RadWindow x:Name="OpportunitiesWindow" CanClose="False" Header="Opportunities" Top="100" Left="30" Width="700" Height="500">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<riaControls:DomainDataSource Name="OpportunityDataSource" QueryName="GetOpportunities" AutoLoad="True" LoadSize="10">
<riaControls:DomainDataSource.DomainContext>
<web:OpportunityDomainContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
<telerikNavigation:RadToolBar x:Name="OpportunitiesToolBar" Grid.Row="0" Grid.Column="0">
<Button Click="Button_Click" Tag="ExportXLS">
<Image Width="16" Height="16" ToolTipService.ToolTip="Export to Microsoft Excel" Source="/Curve;component/Assets/Images/excel_icon.png" />
</Button>
<telerikNavigation:RadToolBarSeparator />
<TextBox x:Name="txtSearchQuery" Width="100" />
<Button Click="Button_Click" Tag="Search">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Search" ToolTipService.ToolTip="Search" />
</StackPanel>
</Button>
</telerikNavigation:RadToolBar>
<my:RadGridView Grid.Row="1" Grid.Column="0" CanUserFreezeColumns="False" Exporting="OpportunityGridView_Exporting" AutoGenerateColumns="false" Name="OpportunityGridView"
MultipleSelect="True" RowIndicatorVisibility="Collapsed"
ItemsSource="{Binding Data, ElementName=OpportunityDataSource}"
IsBusy="{Binding ElementName=OpportunityDataSource, Path=IsBusy}"
CanUserInsertRows="False"
CanUserDeleteRows="False" IsReadOnly="True">
<telerikNavigation:RadContextMenu.ContextMenu>
<telerikNavigation:RadContextMenu Name="RowContextMenu" Opened="RadContextMenu_Opened" ItemClick="RadContextMenu_ItemClick">
<telerikNavigation:RadContextMenu.Items>
<telerikNavigation:RadMenuItem Header="Add" />
<telerikNavigation:RadMenuItem Header="Edit" />
<telerikNavigation:RadMenuItem Header="Delete" />
</telerikNavigation:RadContextMenu.Items>
</telerikNavigation:RadContextMenu>
</telerikNavigation:RadContextMenu.ContextMenu>
I have also entered the following code in the RowLoaded event of my RadGridView:
Private Sub OpportunityGridView_RowLoaded(ByVal sender As Object, ByVal e As Telerik.Windows.Controls.GridView.RowLoadedEventArgs) Handles OpportunityGridView.RowLoaded
If TypeOf e.Row Is Telerik.Windows.Controls.GridView.GridViewRow Then
RadContextMenu.SetContextMenu(e.Row, RowContextMenu)
End If
End Sub
Still no context menu :(
I am going to demo my app this afternoon, and this context menu is the last piece of the puzzle.
Thanks for your help.
Mike
