Hi, Sir,
I am trying to use the dymaic binding of Datagrid component. Referenced by the example, I had setup Property="@GetColumnPropertyExpression(column.Key, column.Value)
Also in the code, I had the following function.
public string GetColumnPropertyExpression(string name, Type type)
{
var expression = $@"it[""{name}""].ToString()";
return type == typeof(int) ? $"int.Parse({expression})" : expression;
}
However, what about the other data types? I had tried to use datatime etc, it will failed
The binary operator Equal is not defined for the types 'System.String' and 'System.DateTime'
How should I fix this error?
Thanks.