Validation Message not showing

Dear Support

Im am using the Version 20.02.0.36.


The Inline Editing Messsages are not showing.


The model:

[Required(AllowEmptyStrings = false, ErrorMessage = "Required")]
public string UserId { get; set; }

public UserDto User { get; set; }

[Required(AllowEmptyStrings = false)]
public string MigraineTypeId { get; set; }

The View:

<SfGrid TValue="MigraineCaseViewModel" DataSource="@MigraineCases"
Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })"
AllowFiltering="true"
ShowColumnChooser="true">
<GridEvents OnActionBegin="ActionBegin" OnActionComplete="ActionComplete" TValue="MigraineCaseViewModel"></GridEvents>
<GridEditSettings
AllowAdding="true"
AllowDeleting="true"
AllowEditing="true">
</GridEditSettings>
<GridFilterSettings Type="GridFilterType.Excel"></GridFilterSettings>
<GridColumns>

<GridColumn Field="@nameof(MigraineCaseViewModel.Id)" IsPrimaryKey="true" AllowEditing="false">
<EditTemplate>
<p>Auto Generated</p>
</EditTemplate>
</GridColumn>


<GridColumn HeaderText="Besitzer">
<Template>
@{ var migraineCase = context as MigraineCaseViewModel; }
<p>@migraineCase?.User?.UserName</p>
</Template>
<EditTemplate>
@{
<SfDropDownList @bind-Value="@(((context as MigraineCaseViewModel)).UserId)"
TItem="UserDto" TValue="string" DataSource="@Users"
AllowFiltering="true">
<DropDownListFieldSettings Value="@nameof(UserDto.Id)"
Text="@nameof(UserDto.UserName)">
</DropDownListFieldSettings>
</SfDropDownList>
}
</EditTemplate>
</GridColumn>

<GridColumn HeaderText="Kategorie">
<Template>
@{ var migraineCase = context as MigraineCaseViewModel; }
<p>@migraineCase?.MigraineType?.Name</p>
</Template>
<EditTemplate>
@{
<SfDropDownList @bind-Value="@(((context as MigraineCaseViewModel)!).MigraineTypeId)"
TItem="MigraineTypeDto" TValue="string" DataSource="@MigraineTypes"
AllowFiltering="true">
<DropDownListFieldSettings Value="@nameof(MigraineTypeDto.Id)"
Text="@nameof(MigraineTypeDto.Name)">
</DropDownListFieldSettings>
</SfDropDownList>
}
</EditTemplate>
</GridColumn>


Screenshot after Update clicked:



Is there something wrong in my imp


3 Replies

NP Naveen Palanivel Syncfusion Team July 25, 2022 05:50 PM UTC

Hi Patrick,  


Sorry for the Inconvenience.


We are currently checking the reported case at our end and we will update the further details in two business day as promised (July 27, 2022). Until then we appreciate your patience. 

Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team July 27, 2022 06:01 PM UTC

Hi Patrick,  


Sorry for the Inconvenience.


We are currently checking the reported case at our end and we will update the further details in two business day as promised (July 29, 2022). Until then we appreciate your patience. 

Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team August 1, 2022 03:55 AM UTC

Hi Patrick,


Thanks for your patience


We checked your query and we would like to inform that data operation and CRUD operation will perform properly only for Field enabled GridColumn. But in your sample you want to perform CRUD operation in template column.  Hence the reported issue occurred.



So we also suggest to define Field property to the Gridcolumn to perform column validation properly in that column. Please get back to us if you have any further queries


Regards,

Naveen Palanivel


Loader.
Up arrow icon