Set datasource on array field

Hello,

I wonder you can help me.

I'm working on asp.net 4.8 mvc with EJ2 Grid.

On view I receive the following view model:

    public class Orders
{
public Order()
{
OrderDetails = new List();
}
public int OrderID { get; set; }
public List OrderDetails { get; set; }
}

public class OrderDetail
{
public OrderDetail()


{
Articles = new List();
}
public int OrderDetailID { get; set; }
public List Articles { get; set; }
}

public class Article
{
public int ArticleID { get; set; }
public string ArticleName { get; set; }
}


User has an interface to select one of orderdetails.

I need to filter the datasource for the grid. This grid only need to show Articles object array inside the OrderDetail inside Order, from the View Model.

I'm playing with datamanager but I can't get the Articles[] field array only displayed on the grid.

Any help please!?

Regards


1 Reply

SI Santhosh Iruthayaraj Syncfusion Team July 20, 2023 12:01 PM UTC

Hi Martin,


Greetings from Syncfusion support.


Before we proceed with providing a solution, we need some information to better understand the issue you are facing. Please provide us with the following details:


  1. Provide a detailed description of the requirement, along with some screenshots or a video demonstration. This will help us better understand the problem and provide an appropriate solution.
  2. The statement “I need to filter the datasource for the grid. This grid only need to show Articles object array inside the OrderDetail inside Order, from the View Model.” needs further clarification. Please explain this requirement in more detail.
  3. Kindly share the complete code for rendering the Grid. Having the full code will allow us to review the implementation and understand the requirements clearly.
  4. If possible, please share a working sample of your implementation with a sample dataSource. This will help us provide you with a solution as quickly as possible.


Regards,

Santhosh I


Loader.
Up arrow icon