|
@@ -53,24 +53,8 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- public DynamicGridColumn Add<TType, TProperty>(Expression<Func<TType, TProperty>> member, int width, string caption, string format,
|
|
|
- Alignment alignment)
|
|
|
- {
|
|
|
- var name = CoreUtils.GetFullPropertyName(member, ".");
|
|
|
- var result = new DynamicGridColumn
|
|
|
- {
|
|
|
- ColumnName = name,
|
|
|
- Caption = caption,
|
|
|
- Width = width,
|
|
|
- Format = format,
|
|
|
- Alignment = alignment
|
|
|
- };
|
|
|
- Add(result);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- public static DynamicGridColumn CreateColumn<TType, TProperty>(
|
|
|
- Expression<Func<TType, TProperty>> member,
|
|
|
+ public static DynamicGridColumn CreateColumn<TType>(
|
|
|
+ Expression<Func<TType, object?>> member,
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
@@ -89,8 +73,8 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
return col;
|
|
|
}
|
|
|
|
|
|
- public DynamicGridColumn Add<TType, TProperty>(
|
|
|
- Expression<Func<TType, TProperty>> member,
|
|
|
+ public DynamicGridColumn Add<TType>(
|
|
|
+ Expression<Func<TType, object?>> member,
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
@@ -105,12 +89,12 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
|
|
|
public class DynamicGridColumns<T> : DynamicGridColumns
|
|
|
{
|
|
|
- public DynamicGridColumn Add<TProperty>(Expression<Func<T, TProperty>> member, int width, string caption, string format, Alignment alignment)
|
|
|
+ public DynamicGridColumn Add(Expression<Func<T, object?>> member, int width, string caption, string format, Alignment alignment)
|
|
|
{
|
|
|
- return Add<T, TProperty>(member, width, caption, format, alignment);
|
|
|
+ return Add<T>(member, width, caption, format, alignment);
|
|
|
}
|
|
|
- public DynamicGridColumn Add<TProperty>(
|
|
|
- Expression<Func<T, TProperty>> member,
|
|
|
+ public DynamicGridColumn Add(
|
|
|
+ Expression<Func<T, object?>> member,
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|