Search This Blog

Showing posts with label formatting. Show all posts
Showing posts with label formatting. Show all posts

Tuesday, October 27, 2015

Conditional Formatting for WinForms Tree List Editor

This is merely a follow up to my previous post:
How to enable the Conditional Formatting feature of the WinForms GridControl in the XAF GridListEditor and preserve ListView formatting settings between runs?

I want to share a similar solution for the TreeListEditor, which I coded and updated according to great customer feedback recently. You can learn more on this feature from the WinForms Controls > Controls and Libraries > Tree List > Conditional Formatting and TreeListOptionsMenu.ShowConditionalFormattingItem documentation.

Here are the steps needed to use the TreeListEditor in your XAF project:
1. In the Module Designer invoked for YourSolutionName.Module.Win/Module.xx file, add the Tree List Editor module to allow Visual Studio to automatically add required assembly references;
2. Copy and include this C# source file into YourSolutionName.Module.Win project (vb.net guys can either use this approach OR convert this code into their language using free tools).

Please track the corresponding Support Center thread to be automatically notified of any changes or other improvements in this regard.

As always, I am looking forward to hearing from you on whether you find this feature helpful for your apps.


Thursday, September 17, 2015

How to enable the Conditional Formatting feature of the WinForms GridControl in the XAF GridListEditor and preserve ListView formatting settings between runs?

In short, this feature allows your end-user to sort or group the data inside the grid AND to visualize selected cells, rows with data bars, icons and predefined or custom appearance schemes. Refer to the following XtraGrid documentation for more information on this feature: 



In general, accomplishing this task in an XAF app consists of several independent parts:
2. Integrating this solution in the GridListEditor using a ViewController  as described in the Access Grid Control Properties  help topic.
3. Serializing the grid's formatting rules information, taking into account the fact that it uses a different mechanism for storing settings, which is based on the Application Model. In XAF, it is best to extend the ListView node with a string property that will hold a serialization representation of formatting rules. Refer to the How to: Extend the Application Model  article for more details.

Monday, April 15, 2013

Improving usability with regard to formatting property values

As you probably know, formatting property values in XAF is typically done in a platform and control-agnostic manner in the Application Model via the Model Editor (the same is of course possible in code). Now it is also possible to define formatting for a value type in a single place for all business class properties, thus saving your time.
For more details, I would like to quote myself from http://www.devexpress.com/issue=S31518:

"Starting with version 13.1, you will have a single place for setting the DisplayFormat and EditMask properties for a type, because the IModelRegisteredPropertyEditor interface has been extended with respective properties. This improvement is mainly supposed to reduce the duplicate work when providing default formatting for common types like System.DateTime, Decimal, Integer, Double, etc.
As expected, these defaults will be automatically propagated to class members, ListView columns and DetailView editors, with the capability to provide custom values at these levels.
Take special note that now PropertyEditors use the default formatting from the application model, or from the DevExpress.ExpressApp.Editors.FormattingProvider singleton if the model is not available. If you build a custom PropertyEditor that does not require any default formatting, you can empty the aforementioned properties in the application model for your business class property or apply ModelDefaultAttribute to it in code."

Screenshot


Hopefully, you will like this small usability improvement. Please let me know your thoughts in comments.