How to change default Collection Editor style

5 posts, 0 answers
  1. Dharmavaram
    Dharmavaram avatar
    73 posts
    Member since:
    Jun 2013

    Posted 17 Oct Link to this post

    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.

     

  2. Dharmavaram
    Dharmavaram avatar
    73 posts
    Member since:
    Jun 2013

    Posted 18 Oct in reply to Dharmavaram Link to this post

    Hi,

    Any update on this??

    Regards,

    Nagasree.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 19 Oct Link to this post

    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.
  5. Dharmavaram
    Dharmavaram avatar
    73 posts
    Member since:
    Jun 2013

    Posted 19 Oct in reply to Martin Vatev Link to this post

    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.

  6. Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 21 Oct Link to this post

    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!
Back to Top
UI for WPF is Visual Studio 2017 Ready