Dear Sir,
Version="17.3.0.26-beta"
Blazor Core Hosted.
<EjsGrid TValue="UnitOfMeasureDto" AllowFiltering="true" AllowReordering="true" AllowResizing="true" @ref="UnitOfMeasureGrid" DataSource="@unitofmeasures" ModelType="@unitofmeasure" AllowPaging="true" Toolbar="@(new List<string>() {"Search"})" Width="100%" AllowExcelExport="true" AllowPdfExport="true" Height="auto">
<GridEditSettings AllowDeleting="true" ShowDeleteConfirmDialog="true"></GridEditSettings>
<GridPageSettings PageSizes="true"></GridPageSettings>
<GridFilterSettings Type="Syncfusion.EJ2.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
<GridEvents TValue="UnitOfMeasureDto" OnActionComplete="OnComplete" RowSelected="onRowSelected" OnRecordDoubleClick="onDoubleClick" />
<GridColumns>
<GridColumn Field=@nameof(UnitOfMeasureDto.Id) Visible="false" IsPrimaryKey="true"></GridColumn>
<GridColumn Field=@nameof(UnitOfMeasureDto.GSTCode) HeaderText="GST Code" Width="160"></GridColumn>
<GridColumn Field=@nameof(UnitOfMeasureDto.GSTName) Width="200" HeaderText="GST Name"></GridColumn>
<GridColumn Field=@nameof(UnitOfMeasureDto.MeasurementId) Width="200" HeaderText="Measurement Type" ForeignKeyValue="Value" DataSource="@metaInfoMesurements"></GridColumn>
<GridColumn HeaderText="Manage" Width="150">
<GridCommandColumns>
<GridCommandColumn Type="CommandButtonType.Delete" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-delete", CssClass = "e-flat" })"></GridCommandColumn>
@*<GridCommandColumn ButtonOption="@(new CommandButtonOptions() { Content = @Enum.GetName(typeof(MeasurementType), 5), CssClass = "e-flat" })"></GridCommandColumn>*@
</GridCommandColumns>
</GridColumn>
</GridColumns>
</EjsGrid>
public List<MetaInfoMesurement> metaInfoMesurements { get; set; }
public UnitOfMeasureDto UnitOfMeasureEditModel { get; set; } = new UnitOfMeasureDto();
protected override async Task OnInitializedAsync()
{
ApiResponseDto apiResponseMetadatas = await Http.GetJsonAsync<ApiResponseDto>("api/MetaData/Mesurement");
metaInfoMesurements = Newtonsoft.Json.JsonConvert.DeserializeObject<MetaInfoMesurement[]>apiResponseMetadatas.Result.ToString()).ToList<MetaInfoMesurement>();
ApiResponseDto apiResponse = await Http.GetJsonAsync<ApiResponseDto>("api/UnitOfMeasure");
if (apiResponse.StatusCode == 200)
{
unitofmeasures = Newtonsoft.Json.JsonConvert.DeserializeObject<UnitOfMeasureDto[]>(apiResponse.Result.ToString()).ToList<UnitOfMeasureDto>();
matToaster.Add(apiResponse.Message, MatToastType.Success, "UOM List Retrieved");//metaInfoGender=MetaDataDtos.
}
else
{
matToaster.Add(apiResponse.Message + " : " + apiResponse.StatusCode, MatToastType.Danger, "UOM List Retrieval Failed");
}
}
}
When i try to give ForeignKeyValue in Grid Column grid could not populate. please find attached screen shot
Regards
Vijay
Attachment:
FKeyError_6d80d0a8.zip