Context Menu hide the collection editor for first time

4 posts, 0 answers
  1. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 15 Dec 2012 Link to this post

    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
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 17 Dec 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 17 Dec 2012 Link to this post

    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
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 18 Dec 2012 Link to this post

    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.

Back to Top