Multi-selection in PropertyGrid

2 posts, 0 answers
  1. Dodd
    Dodd avatar
    44 posts
    Member since:
    Dec 2012

    Posted 12 Aug 2013 Link to this post

    Hi,
    I'm trying to use multi-seleciton in PropertyGrid and the following problems occurred:

    1. When I set SelectionMode to multi in Xaml and try to switch it to Single mode in code-behind, it doesn't work.
    2. When I set NestedPropertiesVisibility="Visible", it worked fine in the single selection mode, but doesn't work in the multi selection mode.
    3. Data Annotations set in the Display attriute doesn't work.
    3. DataTemplateSelection does not work properly as in the single selection. For example, I get
    PropertyType : {Name = "Object" FullName = "System.Object"} System.Type {System.RuntimeType}
    for the code below.

    public class PropertyGridDataTemplateSelector : DataTemplateSelector
        {
            public override DataTemplate SelectTemplate(object item, DependencyObject container)
            {
                if (item as PropertyDefinition != null && (item as PropertyDefinition).SourceProperty.PropertyType == typeof(Int32))
                {
                    return IntegerPropertyDataTemplate;
                }
                return null;
            }

            public DataTemplate IntegerPropertyDataTemplate { get; set; }
        }

    Can you get this fixed?
    Thanks!

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 14 Aug 2013 Link to this post

    Hello Dodd,

    I have tested all issues you listed below, but was not able to reproduce any of them. Could you take a look at the sample attached and let me know whether I am missing something ?  

    Regards,
    Maya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top