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

How to change default Collection Editor style

4 Answers 168 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Dharmavaram
Top achievements
Rank 1
Dharmavaram asked on 17 Oct 2016, 07:01 AM

Hi,

   I have one of the property type Collection,by default collectioneditor template is applying but I want to change EditorStyle to none instead of modal.When I try to do this

 

        [Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(Telerik.Windows.Controls.Data.PropertyGrid.CollectionEditor),Telerik.Windows.Controls.Data.PropertyGrid.EditorStyle.None)]

public ObjectCollection Properties
       {
           get
           {
               if (m_PropertiesSet == false)
               {
                   m_Properties.AddRange(Properties);
                 
               }
              
               return m_Properties;
           }
       }

 

The Collection window is coming as empty.How to achieve this,i just want to change the editor style.?

Regards,

Nagasree.

 

4 Answers, 1 is accepted

Sort by
0
Dharmavaram
Top achievements
Rank 1
answered on 18 Oct 2016, 11:14 AM

Hi,

Any update on this??

Regards,

Nagasree.

0
Martin
Telerik team
answered on 19 Oct 2016, 06:08 AM
Hi Dharmavaram,

Please take a look at our Editor Attribute documentation article where you can find detailed information on how to use it. You can also check our online demo for reference. 

I hope this helps.

Regards,
Martin Vatev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dharmavaram
Top achievements
Rank 1
answered on 19 Oct 2016, 06:19 AM

Hi Martin,

   I have checked it already.There is no constructor for editor attribute which will take only style as parameter.In our class property is of type Collection.So by default we are getting the CollectionEditor in our PropertyField but I don't want the style as dropdown. I want to change the style to modal.

Regards,

Nagasree.

0
Martin
Telerik team
answered on 21 Oct 2016, 10:16 AM
Hello Dharmavaram,

For your convenience, I prepared an example to demonstrate how to achieve the desired behavior. Please take a look at the implementation and consider how this approach fits your scenario.

I hope that this helps. Should you have any other questions, do not hesitate to contact us.

Regards,
Martin Vatev
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Tags
PropertyGrid
Asked by
Dharmavaram
Top achievements
Rank 1
Answers by
Dharmavaram
Top achievements
Rank 1
Martin
Telerik team
Share this question
or