We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Complex binding and how achieve that

Thread ID:





150296 Dec 31,2019 10:40 AM UTC Jan 2,2020 03:36 PM UTC Blazor 1
Tags: Grid
Asked On December 31, 2019 10:40 AM UTC

We have a complex DTOs that is kinda like this

public class Order
    public int? OrderID { get; set; }
    public string CustomerID { get; set; }
    public DateTime? OrderDate { get; set; }
    public double? Freight { get; set; }
    public TestEnum? Test { get; set; }
    public List<TestClass> TestList { get; set; } = new List<TestClass>();

public class TestClass
    public int Id { get; set; }
    public double Value { get; set; }

public class TestId
    public int Id { get; set; }
    public string Name { get; set; }
    public override string ToString()
        return Id.ToString();

and we're trying to create one column for each value of TestList into Order based on a list of TestId

Everthing seems to work but, after editing the column and lost the focus, the model isn't updated with the latest information. I'll attach the example project.

Attachment: BlazorApp1_e6eb3e9a.zip

Renjith Singh Rajendran [Syncfusion]
Replied On January 2, 2020 03:36 PM UTC

Hi Pierpoalo, 

Thanks for contacting Syncfusion support. 

We would like to inform you that it is not feasible to bind a one to many relationship model  to Grid component. Grid supports only one to one relationship model. So we suggest you to bind only one to one relationship model to Grid. 

As one to many support is not available for Grid, based on your requirement we suggest you to flatten the complex property and then bind the flattened property as Field for Grid columns(instead of used template column) and perform editing on that column. 

Please get back to us if you need further assistance to flatten the complex property and bind that flattened property to Grid. 

Renjith Singh Rajendran. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon