|
|
@@ -64,13 +64,15 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null)
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null)
|
|
|
{
|
|
|
var prop = DatabaseSchema.Property(member);
|
|
|
var col = new DynamicGridColumn
|
|
|
{
|
|
|
ColumnName = prop.Name,
|
|
|
Width = width ?? prop.Editor.Width,
|
|
|
+ WidthUnit = widthUnit ?? DynamicGridColumnWidthUnitType.Pixel,
|
|
|
Alignment = alignment ?? prop.Editor.Alignment,
|
|
|
Format = format ?? prop.Editor.Format,
|
|
|
Editor = prop.Editor.CloneEditor(),
|
|
|
@@ -84,10 +86,11 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null
|
|
|
)
|
|
|
{
|
|
|
- var col = CreateColumn(member, width: width, caption: caption, format: format, alignment: alignment);
|
|
|
+ var col = CreateColumn(member, width: width, widthUnit: widthUnit, caption: caption, format: format, alignment: alignment);
|
|
|
Add(col);
|
|
|
return col;
|
|
|
}
|
|
|
@@ -98,10 +101,11 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null
|
|
|
)
|
|
|
{
|
|
|
- var col = CreateColumn(member, width: width, caption: caption, format: format, alignment: alignment);
|
|
|
+ var col = CreateColumn(member, width: width, widthUnit: widthUnit, caption: caption, format: format, alignment: alignment);
|
|
|
Insert(index,col);
|
|
|
return col;
|
|
|
}
|
|
|
@@ -111,10 +115,11 @@ public class DynamicGridColumns : List<DynamicGridColumn>, IGlobalConfigurationS
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null
|
|
|
)
|
|
|
{
|
|
|
- Add(member, width: width, caption: caption, format: format, alignment: alignment);
|
|
|
+ Add(member, width: width, widthUnit: widthUnit, caption: caption, format: format, alignment: alignment);
|
|
|
return this;
|
|
|
}
|
|
|
}
|
|
|
@@ -123,17 +128,18 @@ public class DynamicGridColumns<T> : DynamicGridColumns
|
|
|
{
|
|
|
public DynamicGridColumn Add(Expression<Func<T, object?>> member, int width, string caption, string format, Alignment alignment)
|
|
|
{
|
|
|
- return Add<T>(member, width, caption, format, alignment);
|
|
|
+ return Add<T>(member, width, caption, format, alignment, null);
|
|
|
}
|
|
|
public DynamicGridColumn Add(
|
|
|
Expression<Func<T, object?>> member,
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null
|
|
|
)
|
|
|
{
|
|
|
- var col = CreateColumn(member, width: width, caption: caption, format: format, alignment: alignment);
|
|
|
+ var col = CreateColumn(member, width: width, widthUnit: widthUnit, caption: caption, format: format, alignment: alignment);
|
|
|
Add(col);
|
|
|
return col;
|
|
|
}
|
|
|
@@ -142,10 +148,11 @@ public class DynamicGridColumns<T> : DynamicGridColumns
|
|
|
int? width = null,
|
|
|
string? caption = null,
|
|
|
string? format = null,
|
|
|
- Alignment? alignment = null
|
|
|
+ Alignment? alignment = null,
|
|
|
+ DynamicGridColumnWidthUnitType? widthUnit = null
|
|
|
)
|
|
|
{
|
|
|
- Add(member, width: width, caption: caption, format: format, alignment: alignment);
|
|
|
+ Add(member, width: width, widthUnit: widthUnit, caption: caption, format: format, alignment: alignment);
|
|
|
return this;
|
|
|
}
|
|
|
}
|