Search This Blog

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.

Wednesday, September 9, 2015

How to reset View customizations made by end-users (UPDATE)

I invite you to test an updated version of the previous E1897 solution (it is now marked as obsolete), which we are planning to include in v15.2 by default. The new solution supports both WinForms and ASP.NET apps and also works for both the root and nested Views (e.g., the ones embedded into ListPropertyEditor and DetailPropertyEditor):