UI Type editor with a popup window

16 posts, 1 answers
  1. Sadjad
    Sadjad avatar
    4 posts
    Member since:
    May 2012

    Posted 13 Jun 2012 Link to this post

    In my project some properties of my item could not be set in usual way. these are complicated types which have to set in a customized popup window. this behavior simply could be done by UI Type Editors in .net but it seems the radpropertygrid does not support the EditorAttribute's Component Model. This is exactly what I'm looking for but I couldn't find any similar approach for wpf and rad controls after hours of searching. I appreciate it if someone give me a hint.

    Thanks in Advance
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 13 Jun 2012 Link to this post

    Hello Sadjad,

    Actually, RadPropertyGrid does not support Editor Attribute for the time being. However, it is a good idea and we will definitely consider its implementation. I have logged it in our system as a feature request.   
    As for providing a solution for the current state of RadPropertyGrid, I would need a bit more details about your exact scenario. Would it appropriate for you to define PropertyDefinition-s and set the required editor inside ? 

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sadjad
    Sadjad avatar
    4 posts
    Member since:
    May 2012

    Posted 13 Jun 2012 Link to this post

    As it described in the link I put in my post before I want to have my own window and access it through the specific property in propertygrid let's say like a small button with text attribute of (...) and after pressing the button the window pops up so I can set my values. these values are gonna set in my item using UITypeEditor. The EditorAttribute takes care the connecting the whole complex like this:
    class MyItem
    {
    ...
    [EditorAttribute(typeof(myUITypeEditorclass), typeof(System.Drawing.Design.UITypeEditor))]
    publuc Mytype ThisProperty { set;get;}
    }

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 15 Jun 2012 Link to this post

    Hello Sadjad,

    My recommendatation would be to create the editor you require and set it as Editor for the property you want. Another possible approach would be to work with data template selectors as illustrated in this demo.  

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Sadjad
    Sadjad avatar
    4 posts
    Member since:
    May 2012

    Posted 26 Jun 2012 Link to this post

    Hi again

    I want to suggest another feature which I understand radpropertygrid does not support yet. The Question here shows how we can display just the properties required and prevent not wanted ones be used by propetygrid. But actually it didn't worked on my wpf project and after debugging I understood the TypeConverter didn't consider by propertygrid. It'll be quite useful if it support such capability.

    Thanks for your attention
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 29 Jun 2012 Link to this post

    Hello Sadjad,

    I might be missing something here, but why not working with Browsable attribute instaead ? Please take a look at our demos for a reference.

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Sadjad
    Sadjad avatar
    4 posts
    Member since:
    May 2012

    Posted 29 Jun 2012 Link to this post

    hey

    The problem with browsable is it needs a constant parameter to show or show not an attribute. But in that case I did not know which attributes needs to be displayed till run-time. It's kind of a user's choice dependent situation. when creating an instance of the object it clarifies which one has to be shown.
  9. Bill Anderson
    Bill Anderson avatar
    9 posts
    Member since:
    Aug 2009

    Posted 25 Sep 2012 Link to this post

    I too needed an approach that required "runtime" knowledge to know if a property needed an attribute (or even a property for that matter).

    I implemented CustomTypeDescriptor and CustomPropertyDescriptor (for the RadPropertyGrid). This gave me the support to define attributes/properties/events at runtime.

    http://msdn.microsoft.com/en-us/magazine/cc163816.aspx (an older article, but works :) )

    Perhaps you could find a similar solution using this approach.

    Thanks!
    Bill
  10. YBQ
    YBQ avatar
    2 posts
    Member since:
    Feb 2014

    Posted 10 Jun 2014 in reply to Maya Link to this post

    This is almost a two years old post, and looks like this is still not supported. Please confirm?
  11. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Jun 2014 Link to this post

    Hi Yasir,

    I am actually developing the feature at the moment. I will expose a new attribute that will have editor control, target property and style (dropDown, Modal, None) as properties and will enable the user to define an editor quite more easily than the WinForms approach with inheriting from UITypeEditor. Thus you will be able to add directly just a RadNumericUpDown for a particular numeric property. 
    Will that fit into your scenario ? If appropriate for you, could you share more information about your exact settings so that we can test it during the QA process ?
    Thank you in advance for the cooperation or any feedback that you have. 


    Regards,
    Maya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  12. YBQ
    YBQ avatar
    2 posts
    Member since:
    Feb 2014

    Posted 10 Jun 2014 in reply to Maya Link to this post

    The property takes comma separated values and I need to pop a dialog where user can add, delete and edit values and need to validate the list. When can I expect this to be in a build?
  13. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 11 Jun 2014 Link to this post

    Hi Yasir,

    Thank you for the feedback. The feature will be included in one of our next internal builds right after our testing procedures are passed.

    Regards,
    Maya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  14. Moti
    Moti avatar
    5 posts
    Member since:
    Jan 2014

    Posted 23 May Link to this post

    Hello ,

    This is almost a four years old post, and looks like this is still not supported. Please confirm?

    10x

  15. Stefan X1
    Admin
    Stefan X1 avatar
    523 posts

    Posted 26 May Link to this post

    Hello Moti,

    This feature is actually introduced as of Q2 2014 SP1. You can check out the Release History for this version. I suggest you also taking a look at the Editor Attribute topic for more information on this matter.

    All the best,
    Stefan X1
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  16. Dharmavaram
    Dharmavaram avatar
    73 posts
    Member since:
    Jun 2013

    Posted 20 Sep in reply to Stefan X1 Link to this post

    Hi Stefan,

           Is there any option to complete invoke our own dialog instead of invoking usercontrol with editor style as Modal.I required it because I don't want to have minimize and maximize buttons for my window,I want to give my own title and image  to the window. I feel UITypeEditor in Winfroms is flexible to use than this Editor attribute in Telerik.

    I have another requirement of opening OpenFileDialog when user clicks edit button. How to achieve this?? 

    Regards,

    Nagasree.

  17. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 20 Sep Link to this post

    Hello Dharmavaram,

    I've attached a sample project where I'm handling RadPropertyGrid's BeginningEdit event and initializing a new RadWindow there in order to achieve the desired behavior. You can use it as a guide and implement your own custom logic. Bear in mind that for this to work,EditMode should be set to Single.

    Regarding your second requirement, you can have a look at the AutoBindBehavior with EditorTemplateSelector demo from the SDK Samples Browser which demonstrates a similar behavior.

    I hope you find this helpful. Do let me know if you need any further assistance on the matter.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready