This component aims to display data along two different hierarchical classifications, as if a datagrid had its rows and columns defined by trees.
Rows and columns are defined by HierarchyDefinition. There are two kinds of these definitions:
-
ProducerDefinition: provides an object, by default on row level.
-
ConsumerDefinition: extracts information from the object received from the producer, by default on column level.
public object Content { get; set; }Defines the content of the grid header associated to the definition.
public X Add<X>(X child) where X : HierarchyDefinitionAdds a properly set child element to the current hierarchy definition.
public Func<object>? Producer { get; set; }Defines the function that will be used to retrieve data from the producer.
public Func<Qualification>? Qualify { get; set; }Allows override of qualification for all elements produced by this definition, independently of the consumer definition.
public bool IsLocked { get; set; }If set to true, all produced elements will be read-only, even if the consumer defines an editor.
public Func<object, object>? Consumer { get; set; }Defines the function that will extract information from the provided data.
public Func<object, string>? Formatter { get; set; }Defines the function that will format the consumer result as it will be displayed in the grid.
public Func<object, Qualification>? Qualify { get; set; }Defines the function that will set the cell qualification according to consumer result.
public Func<object, (ThemeColor, ThemeColor)>? Colorize { get; set; }Defines the function that will set the cell background if cell qualification is set to Custom.
public Func<object, object, string, bool>? Editor { get; set; }Defines the function called when a cell edition is validated. The first parameter is the object provided by the producer, the second is the result from the consumer, and the third one is the string input from the editing textbox. The boolean returns whether data has been updated.
public Func<object, object, bool>? IsLocked { get; set; }Indicates that the cell can't be edited. The first parameter is raw data from the producer, and the second is the result from the consumer.
Cell rendering can be modified according to a qualification. Available values are: Unset, Empty, Normal, Error, Warning, Remark, Custom, ReadOnly.
Even if UI performance has always been a major focus, the more cells are displayed, the more the component will slow down.