OData $expand in data source

I have the following three classes for a many-to-many relationship between Employee and Training:

public class Employee {
public Guid EmployeeId { get; set; }
public string Name { get; set; }
}

public class EmployeeTraining {
public Guid EmployeeId { get; set; }
public Guid TrainingId
public bool Attended { get; set; }
}

public class Training {
public Guid TrainingId { get; set; }
public string Name { get; set; }
}

The data grid data source is an OData API. These OData URLs work:

https://myodataAPI/Employee
https://myodataAPI/Employee?$expand=EmployeeTraining

Expanding it one more time like this does not:

https://myodataAPI/Employee?$expand=EmployeeTraining ($expand=Training)

Is that a limitation of the control or am I doing something wrong?


My goal is to have a list of Employees (Employee.Name) with a detail template that shows each training the employee registered for (Training.Name) and whether they actually attended the training (EmployeeTraining.Attended)


1 Reply

RS Renjith Singh Rajendran Syncfusion Team September 21, 2021 03:58 AM UTC

Hi Scot, 

Greetings from Syncfusion support. 

We need the following details to further proceed on this and provide you a suggestion as early as possible. Kindly share with us the following details. 

  1. Share the complete Grid rendering codes. We need to analyze the GridColumns you have defined inside Parent Grid and DetailTemplate Grid.
  2. Share the odata response structure of the your odata requests.
  3. Share a video demo showing the replication of the problem you are facing.

Regards, 
Renjith R 


Loader.
Up arrow icon