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

class name hidden

6 Answers 94 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Alex Troto
Top achievements
Rank 1
Alex Troto asked on 02 Aug 2012, 07:25 AM
Hi,
Is it possible to hide the name of class in a nested scenario ?
For an end-user it's just a source of confusion. I've attached a picture with an example.
Thanks,
Alex Troto

6 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 03 Aug 2012, 12:27 PM
Hello,

In case you are using AutogeneratedPropertyDefinitions, you can subscribe to the AutogeneratingPropertyDefinitions event and set an empty DataTemplate to the EditorTemplate property of the respective PropertyDefinition. And on the other hand, for manually-generated property definitions, you can try RadPropertyGrid's UnboundMode. Please, refer to Example1 from this article.

Kind regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alex Troto
Top achievements
Rank 1
answered on 24 Oct 2012, 07:51 AM
Hi, 
Your solution worked like a charm with Telerik 2012.2.725.1050.
Starting with the last Telerik updates, this doesn't work anymore, I'm getting a null reference unhanded error.
I'm using AutogeneratedPropertyDefinitions.
Code for AutogeneratingPropertyDefinitions event :
private void RadPropertyGrid_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e)
        {
                if (e.PropertyDefinition.SourceProperty.PropertyType.IsClass
                    && !e.PropertyDefinition.SourceProperty.PropertyType.IsSealed)
                {
                    e.PropertyDefinition.EditorTemplate = new DataTemplate();
                }
            }
All I want it's to hide class name for nested properties.
Regards,
Alex
0
Ivan Ivanov
Telerik team
answered on 24 Oct 2012, 09:18 AM
Hi,

Would you please specify, which is the version that you are using to reproduce this exception, so that we would be able to investigate the problem?

Kind regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Alex Troto
Top achievements
Rank 1
answered on 24 Oct 2012, 09:26 AM
Hi,
If I'm using Telerik 2012.2.725.1050. it's ok.
After I've migrated to 2012.3.1017.1050, it's not working anymore.
Alex
0
Alex Troto
Top achievements
Rank 1
answered on 25 Oct 2012, 10:53 AM
(UPDATE)
I believe I found a clue. If i set EnableEditorCaching="False", the problem goes away.
I'm not sure what it's the meaning of this property.
Regards,
Alex
0
Ivan Ivanov
Telerik team
answered on 25 Oct 2012, 01:17 PM
Hello,

We have introduced a set of caching optimizations that target to improve scenarios with search, grouping and rebinding to an item of the same type. They are enabled by default, but you can easily disable them by using the mentioned property. Unfortunately we did not manage to reproduce this exception. Would it be possible for you to isolate it in a repro project?

Kind regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PropertyGrid
Asked by
Alex Troto
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Alex Troto
Top achievements
Rank 1
Share this question
or