Merge pull request #16606 from abpframework/AbpExtensibleDataGrid

Set correct `Field` of `component` of `column`.
pull/16609/head
liangshiwei 2 years ago committed by GitHub
commit 13325e0945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,11 +72,22 @@
{
@if (column.Component != null)
{
<DataGridColumn TItem="TItem" Field="@typeof(TItem).GetProperties().First().Name" Caption="@column.Title">
<DisplayTemplate>
@RenderCustomTableColumnComponent(column.Component, context)
</DisplayTemplate>
</DataGridColumn>
@if (column.ValueConverter == null)
{
<DataGridColumn TItem="TItem" Field="@column.Data" Caption="@column.Title" Sortable="@column.Sortable" DisplayFormat="@column.DisplayFormat" DisplayFormatProvider="@column.DisplayFormatProvider" >
<DisplayTemplate>
@RenderCustomTableColumnComponent(column.Component, context)
</DisplayTemplate>
</DataGridColumn>
}
else
{
<DataGridColumn TItem="TItem" Field="@column.Data" Caption="@column.Title" Sortable="@column.Sortable">
<DisplayTemplate>
@RenderCustomTableColumnComponent(column.Component, context)
</DisplayTemplate>
</DataGridColumn>
}
}
else
{

Loading…
Cancel
Save