Unplanned
Last Updated: 23 Feb 2017 14:07 by Yehudah
Yehudah
Created on: 22 Feb 2017 11:06
Category: PivotGrid
Type: Feature Request
0
PivotGrid: Expose QueryableFieldDescription.ProperyInfo property
As you did with PropertyInfoFieldInfo, which expose PropertyInfo property.

This can be very helpful to many custom logic based on the source PropertyInfo.
For example:

private static DisplayAttribute GetDisplayAttribute(QueryableFieldDescription fieldInfo)
{
    return fieldInfo.PropertyInfo.GetCustomAttribute<DisplayAttribute>();
}
3 comments
Yehudah
Posted on: 22 Feb 2017 16:24
Addition: This issue is not only about QueryableFieldDescription, But in all IPivotFieldInfo's. Currently, if I want to get data about the source field/property, I need to use reflection and read private field.
I'm looking for a better way.

You can see my current code here: https://github.com/YehudahA/Sandbox/blob/master/FieldInfoMetadataUsingReflection.cs

My suggestion is something like this: https://github.com/YehudahA/Sandbox/blob/master/FieldInfoMetadataUsingInterface.cs
Yehudah
Posted on: 22 Feb 2017 11:09
*Typo
Yehudah
Posted on: 22 Feb 2017 11:08
Type: As you did with PropertyInfoFieldInfo, which exposes PropertyInfo property.