Grid edit item dialog empty despite populated grid

I have a SfGrid (19.3.0.57) in my page that populates successfully, but when I go to double-click on an item, it gives me an empty item. 

When I observe the item in the GridActionBegin event, the event argument has a populated PreviousData object containing the object data, but the Data property is null.

My code:

<div class="row">
    <div class="col-3">
        <sfdropdownlist @ref="lst" titem="string" tvalue="string" placeholder="Select Location" datasource="service.LocationHandles">
            <dropdownlistevents tvalue="string" titem="string" onvalueselect="LocationSelected">
            <dropdownlistfieldsettings text="string" value="string">
        </dropdownlistfieldsettings></dropdownlistevents></sfdropdownlist>
    </div>
</div>
<div class="row">
    <sfgrid @ref="grid" width="100%" datasource="@gridProducts" toolbar="@toolbar" allowselection="true" allowpaging="true">
        <grideditsettings newrowposition="NewRowPosition.Bottom" mode="EditMode.Dialog" allowadding="true" allowediting="true" alloweditondblclick="true" showdeleteconfirmdialog="true" allowdeleting="true"></grideditsettings>
        <gridevents tvalue="ProductGridModel" onactionbegin="GridActionBegin" onrecorddoubleclick="GridDoubleClick">
        <gridcolumns>
            <gridcolumn field="@nameof(ProductGridModel.RowKey)" isprimarykey="true" visible="false" allowediting="false"></gridcolumn>
            <gridcolumn field="@nameof(ProductGridModel.Id)" type="ColumnType.Number">
            <gridcolumn field="@nameof(ProductGridModel.Name)" headertext="Name">
            <gridcolumn field="@nameof(ProductGridModel.Description)" headertext="Description">
            <gridcolumn field="@nameof(ProductGridModel.Price)" headertext="Price">
            <gridcolumn field="@nameof(ProductGridModel.Duration)" headertext="Duration(minutes)">
            <gridcolumn field="@nameof(ProductGridModel.LocationId)" isprimarykey="true" visible="false" allowediting="false">
        </gridcolumn></gridcolumn></gridcolumn></gridcolumn></gridcolumn></gridcolumn></gridcolumns>
    </gridevents></sfgrid>
</div>
@code{
    readonly List<string> toolbar = new() {"Add", "Edit", "Delete" };

    SfDropDownList<string, string> lst;
    SfGrid<ProductGridModel> grid;
    public List<ProductGridModel> gridProducts { get; set; }

private void LocationSelected(SelectEventArgs<string> obj)
    {
        log.LogInformation(@"value selected: {Loc}",obj.ItemData);
        log.LogTrace(@"ProductService has {ProdCount} products",service.Products.Count);
        gridProducts.Clear();
        gridProducts = service.Products.Where(x => x.LocationId == obj.ItemData).ToList();
        log.LogInformation(@"grid is now bound to {PCount} products from {Loc}",gridProducts.Count,obj.ItemData);
        grid.Refresh();
    }


    private void GridActionBegin(ActionEventArgs<productgridmodel> args)
    {
        if (args.RequestType == Action.BeginEdit)
        {
            if (args.Data == null)
            {
                log.LogTrace("grid item is null");
                return;
            }
            log.LogTrace(@"{LocationId},{ProdID}",args.Data.LocationId,args.Data.RowKey);


        }
}



3 Replies

LR Lucas R Vogel December 8, 2021 04:08 PM UTC

I rolled back to the previous version and the issue was resolved. 



RN Rahul Narayanasamy Syncfusion Team December 9, 2021 11:02 AM UTC

Hi Lucas, 
 
Greetings from Syncfusion support. 
 
We have validated your reported problem and we have already confirmed this as an issue and logged the defect report “Problem with editing when using dialog mode for the same. Thank you for taking time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and including the fix in our upcoming bi-weekly release which is expected to be rolled out on or before the mid of December 2021. Until then we appreciate your patience.      
         
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.         
 
 
Until then we appreciate your patience. 
 
Regards, 
Rahul 



RN Rahul Narayanasamy Syncfusion Team December 20, 2021 12:01 PM UTC

Hi Lucas, 
 
We are glad to announce that our weekly patch release (v19.3.0.59) has been rolled out successfully and in this release, we have included the fix for the issue Problem with editing when using dialog mode”. So kindly update your NuGet to our latest version to resolve the reported issue. 
 
Please find the NuGet package below 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.  
 
Regards, 
Rahul 


Loader.
Up arrow icon