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

Context Menu at an empty GridView

2 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lina fetisova
Top achievements
Rank 1
lina fetisova asked on 27 Jul 2010, 04:20 AM
Good day!
How can I make such a context menu on a grid to open when the gridview is empty?

<telerikGridView:RadGridView x:Name="ClisentsListGrid"
                                      Height="auto"  ItemsSource="{Binding}"
                                      AutoGenerateColumns="False" CanUserFreezeColumns="False"
                                      ScrollMode="RealTime" IsReadOnly="True" RowIndicatorVisibility="Collapsed"
                                      FontFamily="Verdana"
                                      UseLayoutRounding="True" ShowGroupPanel="True"
                                      RowDetailsTemplate="{StaticResource SaleInfoRowDetailsTemplate}" Width="auto"
                                      ShowColumnFooters="True"  >
            <Navigation:RadContextMenu.ContextMenu>
                <Navigation:RadContextMenu x:Name="gridMenu" Opened="RadContextMenu_Opened" ItemClick="RadContextMenu_ItemClick" ClickToOpen="True"  NotifyOnHeaderClick="True" StaysOpen="True" >
                    <Navigation:RadContextMenu.Items>
                        <Navigation:RadMenuItem Header="Create an item" />
                        <Navigation:RadMenuItem Header="Refresh" />
                    </Navigation:RadContextMenu.Items>
                </Navigation:RadContextMenu>
            </Navigation:RadContextMenu.ContextMenu>

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 Jul 2010, 06:36 AM
Hello,

 Most probably you have code in Opened preventing the menu to open on anything but GridViewRow similar to our example

Kind regards,
Vlad
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
0
lina fetisova
Top achievements
Rank 1
answered on 27 Jul 2010, 10:26 AM
great thank to you! =)
Tags
GridView
Asked by
lina fetisova
Top achievements
Rank 1
Answers by
Vlad
Telerik team
lina fetisova
Top achievements
Rank 1
Share this question
or