Click or drag to resize
Accord.NET (logo)

ExtensionsAllowNestedProperties Method

Enables the display of recursively nested properties in the Windows.Forms' DataGridView control.

Namespace:  Accord.Controls
Assembly:  Accord.Controls (in Accord.Controls.dll) Version: 3.8.0
public static void AllowNestedProperties(
	this DataGridView dataGridView,
	bool value
Request Example View Source


Type: System.Windows.FormsDataGridView
The DataGridView to enable nested properties.
Type: SystemBoolean
True to use nested properties, false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataGridView. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
This method will register a custom cell formatting event in the DataGridView and retrieve any nested property specified in the column's DataPropertyName property using reflection. This method is based on th idea by Antonio Bello, originally shared in:
See Also