winformsdevexpressdevexpress-windows-ui

How can change the behavior of Devexpress to produce the my expectation view instead of default view


Normally, when you run the Devexpress WinForm project, you will see the objects as predetermined. Like this:

category

worktime

How can I change the behavior of DevExpress? How can I apply TreeList instead of the default list from DevExpress? (Or in general, change the presentation of data corresponding to my wishes)

My project structure:

my project structure


Solution

  • As far as I can see you're talking about the XAF ListView's customization. In order to accomplish the hierarchical representation, I suggest you review the guide Tree List Editors (Organize Hierarchical Data) and the example How to Use Tree List Editors to Display List Views.

    In short, to display data in a tree-like structure, the ITreeNode interface should be implemented in the appropriate business classes.