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

Context Menu hide the collection editor for first time

3 Answers 78 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Akram
Top achievements
Rank 1
Akram asked on 15 Dec 2012, 05:35 PM
Hi
I have a problem when using RadContextMenu against the CollectionEditor fields, when it is first time to open the context menu then the collection editor pop up automatically hidden.

Please advice me what to do to keep the pop up open.

Thanks,
Akram

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 17 Dec 2012, 08:26 AM
Hello Akram,

Will it be possible to provide slightly more details on the issue ? What is the definition of the property grid and the corresponding context menu ?  

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Akram
Top achievements
Rank 1
answered on 17 Dec 2012, 03:30 PM
Hi
I made an example to show the issue, please follow these steps to re-create the case:

1- Open the pop up collection editor for the SubItem property
2- Add Item bby press the Add button
3- try to show the context menu for one of the two SubItem properties such as ID or Data
4- The pop up will automatically hidden.

I need to know why the pop up disappeared?


This is the Window.xaml

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TestRadPropertyGridWithContextMenu.MainWindow"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded_1">
    <Window.Resources>
        <telerik:RadContextMenu x:Name="contextMenu1" x:Key="contextMenu1" >
            <telerik:RadMenuItem Name="editMenuItem" Header="Edit"  />
            <telerik:RadMenuItem Name="copyMenuItem" Header="Copy"  />
            <telerik:RadMenuItem Name="pasteMenuItem" Header="Paste"  />
        </telerik:RadContextMenu>
    </Window.Resources>
    <Grid>

        <telerik:RadPropertyGrid Name="propertyGrid1">
            <telerik:RadPropertyGrid.FieldStyle>
                <Style TargetType="telerik:PropertyGridField" >
                    <Setter Property="telerik:RadContextMenu.ContextMenu" Value="{StaticResource contextMenu1}"/>
                </Style>
            </telerik:RadPropertyGrid.FieldStyle>
        </telerik:RadPropertyGrid>

    </Grid>
</Window>

This is the Window.xaml.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TestRadPropertyGridWithContextMenu
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
           
        }

        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            propertyGrid1.Item = new PropertyGridItemExample() { Name = "Mark", SubItem=new List<SubItem>() };
        }
    }
    class PropertyGridItemExample
    {
        public string Name { get; set; }
        public List< SubItem> SubItem { get; set; }
    }
    class SubItem
    {
        public string ID { get; set; }
        public string Data { get; set; }
    }
}



Thanks
Akram
0
Maya
Telerik team
answered on 18 Dec 2012, 01:01 PM
Hi Akram,

I managed to resolve the issue you reported. I will investigate it and write you back once I have more information on it.  

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PropertyGrid
Asked by
Akram
Top achievements
Rank 1
Answers by
Maya
Telerik team
Akram
Top achievements
Rank 1
Share this question
or