I'm writing a small winform Windows application that retrieves information from a webshop. Retrieving the information works and I am able to show it in a dataGridView.
I retrieve the information in list named "orders", this list has multiple levels in structure. When I set "orders" as datasource for my dataGridView all information on level 0 is visible [Great].
All orders are displayed as rows in my dataGridView, but now I need to access information deeper in the list.
List "orders" contains all the orders and some basic information, but I need to display
orders.0.billing.firstname
Is there a way to also show columns deeper in order list?
Here is a screenshot of how orders is built :
This is the code:
public async void RefreshOrders()
{
//Connect to domain using REST API
MyRestAPI rest = new MyRestAPI("https://example.com/wp-json/wc/v3/", "ck_", "cs_");
//Create object wc from store
WCObject wc = new WCObject(rest);
//Get all orders
var orders = await wc.Order.GetAll();
//Store all orders in a dataGridView
dataGridViewOrders.DataSource = orders;
}
It need to be like this:
orders -> order -> billing -> firstname :