I would like to change behavior of DataColumn.Expression so that when I write:
DataColumn.Expression = "MyMethod(Price)"
it will call MyMethod, pass value from Price column into it and display evaluated value.
How to acomplish this?
I would like to change behavior of DataColumn.Expression so that when I write:
DataColumn.Expression = "MyMethod(Price)"
it will call MyMethod, pass value from Price column into it and display evaluated value.
How to acomplish this?
Not possible. The expression parser behind the Expression property is simple and not extensible. Making arbitrary function calls is not one of its capabilities. There are several ways to work around this, especially ones that don't require an expensive reflection lookup. Consider the DataTable.RowChanged event for example.