Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

When adding a record in DataGrid, the object that is initialized somehow gets a value for a navigating property:

        public string Name { get; set; }
        public string Address { get; set; }
        public string Zip { get; set; }
        public int? CountryId { get; set; }
 
        public virtual Country Country { get; set; }

so, even though the properties Name, Address, Zip, CountryId are initialized properly, Country is not set to null: it is set to a object created probably by Activator.CreateInstance(), since all it's properties are set to null.

After editing the object (Name, Address, Zip and CountryId set to proper values), I cannot save this object, as EntityFramework tries to create a Country first, based on Country navigation property. 

Now, if I initialize the object via an event, like:

    private void ActionBegin(ActionEventArgs args)
    {
        if (args.RequestType == Syncfusion.Blazor.Grids.Action.Add)
        {
            args.Data = new Tenant();
        }
    }

... in this case the Country property is null, and it works.