Change default editor for float to be a RadNumericUpDown

3 posts, 0 answers
  1. Guy
    Guy avatar
    16 posts
    Member since:
    Mar 2012

    Posted 11 May 2016 Link to this post

    Trying out the property grid and haven't been able to figure out how I can override the default template for common .NET types such as float to use the RadNumericUpDown rather than a TextBox. I looked at setting a custom DataTemplateSelector as described here: but this can only work if I know the property name. So my question is the following: how can I change the default float editor template in the property grid? I want to do this for integers, colors, and many more common types. I don't want to have to add custom attributes to all the properties either.




  2. Guy
    Guy avatar
    16 posts
    Member since:
    Mar 2012

    Posted 11 May 2016 in reply to Guy Link to this post

    Going to answer my own question since I figured it out: It's possible using a custom data template selector and on each data template I have to use the AutoBind attached behavior, for example:


  3. Stefan
    Stefan avatar
    791 posts

    Posted 12 May 2016 Link to this post

    Hi Guy,

    Thank you very much for sharing your solution with the community.

    More information on the AutoBind Attached Behavior can be found here.

    All the best,
    Stefan X1
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top