Hello,
I have just upgraded to 18.2.45 and, after fixing some issues on Localization and ValidationRules, I found a few problems on the Grid component:
1. I have Id column with parameter Visible="false". Now it is appearing on my dialog edit.
<GridColumn Field=@nameof(People.Id) HeaderText="Id" IsPrimaryKey="true" IsIdentity="true" AllowEditing="false" Visible="false" ShowInColumnChooser="false"></GridColumn>
2. I have a few columns with Dropdown inside EditTemplate and the dropdown component is not shown. I use OData v4 as data source.
<SfGrid ID="MainGrid" @ref="@MainGrid" Query="@GridQuery" TValue="People" AllowPaging="true" AllowSorting="true" AllowReordering="true"
AllowResizing="true" AllowFiltering="false" AllowGrouping="false" ShowColumnChooser="true" Toolbar="@Tool">
<GridPageSettings PageSize="5"></GridPageSettings>
<GridEvents OnActionBegin="ActionBeginHandler" OnToolbarClick="ToolbackClickHandler" OnActionFailure="ActionFailureHandler" RowSelected="RowSelectHandler" TValue="People"></GridEvents>
<SfDataManager Url=@($"{apiURL}/people") Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true"></SfDataManager>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" ShowDeleteConfirmDialog="true" Mode="EditMode.Dialog">
<HeaderTemplate>
@{
var text = GetPeopleHeader((context as People));
<span>@text</span>
}
</HeaderTemplate>
</GridEditSettings>
<GridColumns>
<GridColumn Field=@nameof(People.Id) HeaderText="Id" IsPrimaryKey="true" IsIdentity="true" AllowEditing="false" Visible="false" ShowInColumnChooser="false"></GridColumn>
<GridColumn Field=@nameof(People.PersonSalutation) HeaderText="Saludo" Visible="@mainFields" AutoFit="true">
<Template>
@{
var peopleContext = context as People;
if (@peopleContext.PersonSalutationNavigation != null) {
<span>@peopleContext.PersonSalutationNavigation.SalutationShort</span>
}
}
</Template>
<EditTemplate>
Saludo
<SfDropDownList ID="PersonSalutation" TItem="Salutations" TValue="string" Placeholder="Saludo" Index="@salutationIndex">
<SfDataManager Url=@($"{apiURL}/salutations") Adaptor="Adaptors.ODataV4Adaptor" CrossDomain="true" Offline="true"></SfDataManager>
<DropDownListFieldSettings Value="Id" Text="SalutationShort"></DropDownListFieldSettings>
</SfDropDownList>
</EditTemplate>
</GridColumn>
3. In a similar way I have an SfUploader that is not showing inside dialog edit template. In a previous version it was working (18.1.57), then I upgraded to 18.1.59 and always got the error invalid image format (trying with jpg and png files) so choose to try 18.2.45 but now the component is not showing at all (I guess is something to do with EditTemplate tags)
<GridColumn Field=@nameof(PointsPrograms.PointsProgramLogo) HeaderText="Logo" Visible="true" AutoFit="true">
<Template>
@{
var program = context as PointsPrograms;
String imgSrc = noImage;
if (program.PointsProgramLogo != null) {
imgSrc = String.Format("data:image/png;base64,{0}", Convert.ToBase64String(program.PointsProgramLogo, 0, program.PointsProgramLogo.Length));
}
}
<div>
<img src="@imgSrc" class="rounded img-fluid" alt="Flag" />
</div>
</Template>
<EditTemplate>
@{
<p>Logo</p>
var program = context as PointsPrograms;
string imgSrc = null;
if (program.PointsProgramLogo != null)
{
imgSrc = String.Format("data:image/png;base64,{0}", Convert.ToBase64String(program.PointsProgramLogo, 0, program.PointsProgramLogo.Length));
<div>
<img src="@imgSrc" class="rounded mx-auto img-fluid" alt="Flag" />
</div>
}
<SfUploader AllowedExtensions=".jpg, .jpeg, .png" MaxFileSize=3000 Multiple="false">
<UploaderEvents ValueChange="OnChange"></UploaderEvents>
</SfUploader>
}
</EditTemplate>
</GridColumn>
Thanks for your help,
Erick