Problem with RadzenGrid in line modifie

Radezen Grid dont save modifies to objects bindend

<RadzenDataGrid @ref="grdOrdersItems" AllowFiltering="true" AllowSorting="true"  EditMode="DataGridEditMode.Single" ColumnWidth="200px"
                AllowPaging="true" PageSize="3" Data="@ctx0.Items" TItem="EOI.OrderItem" RowUpdate="@orderItem_OnUpdate" RowCreate="@orderItem_OnCreateRow"
                Sort="@orderItem_OnReset" Page="@orderItem_OnReset" Filter="@orderItem_OnReset" >
    <Columns>
    <RadzenDataGridColumn TItem="EOI.OrderItem" Title="Rows ID" Property="Id" Width="50px" Frozen="true" />
    <RadzenDataGridColumn TItem="EOI.OrderItem" Title="Type" Property="ctx0.Type.Description" Width="100px" >
        <Template Context="ctx1">
            @ctx1?.Type?.Description
        </Template>
        <EditTemplate Context="ctx1">
            <RadzenDropDown Name="IdTypes"
                            FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
                            FilterOperator="StringFilterOperator.StartsWith"
                            AllowFiltering="true"
                            AllowClear="true"
                            Placeholder="Insert Product Type"
                            Class="w-100"
                            Data="@Types"
                            TextProperty="Description"
                            ValueProperty="Id"
                            @bind-Value="ctx1.IdTypes">
                <Template Context="ctx2">
                    @if (ctx2?.Deleted)
                    {
                        <div style="color:orange;">
                            <img src="./Images/Icons/RadzenComponents/RadzenDropDown/warning-header-row.png" style="width:18px!important;height:18px!important;">
                            <b>@((ctx2 as EP.Type).Description)</b>
                        </div>
                    }
                    else
                    {
                        <div>
                            <img src="./Images/Icons/RadzenComponents/RadzenDropDown/valid-header-row.png" style="width:18px!important;height:18px!important;">
                            @((ctx2 as EP.Type).Description)
                        </div>
                    }
                </Template>
            </RadzenDropDown>
        </EditTemplate>
    </RadzenDataGridColumn>

then grid is conteined in RadzenTemplateForm

    <DataDetails HeaderPropertyName="Ord_no" DetailsType="EO.OrderHeader" Item="orderHeaderItem" IsBusyCancel="@session.isBusyCancel" IsBusySave="@session.isBusySave"
                 IsBusyAdd="@session.isBusyAdd" OnSubmit="OrderHeader_OnSave" OnExit="OrderHeader_OnExit" OnAdd="OrderHeader_OnAdd">
        <Fields Context="ctx0">

I have 2 problem :

  • when change value of radzendropdownitem not change content of grid, if modify a second time show previous modify value, i have other field in this grid but not have problem

  • When submit receving this error :
    Error found :** One or more validation errors occurred. 0

I use DataAnnotations there are problem with Radzen i must be select another approach to validation as indicate this Microsoft Article relative at Data Validation
https://learn.microsoft.com/en-us/ef/ef6/saving/validation

Thks for the response
PM

The DataGrid will not save anything, the developer is responsible to save modified data to the database. You can check our demos for reference.

Clear, but object passed as data must change, correct . Not speak of change to database, but

private EO.OrderHeader? orderHeaderItem;

<DataDetails HeaderPropertyName="Ord_no" DetailsType="EO.OrderHeader" Item="orderHeaderItem" IsBusyCancel="@session.isBusyCancel" IsBusySave="@session.isBusySave"
               IsBusyAdd="@session.isBusyAdd" OnSubmit="OrderHeader_OnSave" OnExit="OrderHeader_OnExit" OnAdd="OrderHeader_OnAdd">

And passed at this component that is RadzenTemplateForm
Problably is a my incorrect use of RadzenGrid, but i don't understand where ?
If you need other code it not problem send you.

Thanks,i need to solve these 2 problem to go on with dev

The save to database is make with a WebService, with RadzenGrid nested in RadzenTempateForm, the save is make only time with submit or is necessary save after save single row......

If you are paid customer with active subscription you can send us runnable example demonstrating the problem at info@radzen.com.

No i'm not i paid costumer but for other support is necessary pay a subscription ?

Yes, support is provided for paid subscribers only.