Search This Blog

Tuesday, September 9, 2014

Example of a custom PropertyEditor based on the ASPxColorEdit control

I wanted to share an example of a custom XAF Property Editor for viewing and editing System.Drawing.Color properties on the Web. This is what it looks like in the UI:


This custom PropertyEditor uses the built-in ASPxColorEdit control from our ASP.NET Suite and provides a bit better UX than the default ASPxColorPropertyEditor:





If you are interested to see my custom implementation, check out https://www.devexpress.com/Support/Center/Question/Details/T148856.
Feel free to test and modify the example code from this ticket further to better meet your business needs.

P.S.
Customizing default controls or integrating fully custom ones if the defaults do not meet your needs is a standard and recommended practice in XAF, so do not hesitate to try this for other scenarios. You can learn more on this at Using a Control that is not Integrated by Default. This is a very powerful technic that one can use to do amazing things, e.g., to display an end-user report designer on the Web! Yes, the DevExpress.XtraReports.Web.ASPxReportDesigner-based one:


I hope you find this information inspiring and helpful.

4 comments:

  1. Thanks for the example, verry helpfull. Do you also have an example of te suggested web report designer?

    ReplyDelete
    Replies
    1. You're always welcome!
      As for the report designer, this is just a spike (you will have to test and modify it further), but I do not mind sharing it with you: http://downloads.devexpress.com/Share/Temp/Dennis/ASPxReportDesigner_spike.zip

      Delete
    2. Welcome! BTW, you may also be interested in tracking the https://www.devexpress.com/Support/Center/Question/Details/S173711 request.

      Delete