Hi
How to display below data in Gridview
C#
{
"status": true,
"data": {
"id": "2482000",
"order_id": "4340000",
"order_number": "#JS5897",
"created": "2021-03-01",
"awb_number": "59650109492",
"rto_awb": "75312963180",
"courier_id": "24",
"warehouse_id": "21135",
"rto_warehouse_id": "21135",
"status": "rto",
"rto_status": "delivered",
"shipment_info": "DEL / VED",
"history": [
{
"status_code": "IT",
"location": "BAREJA EPU (NCX)",
"event_time": "2021-03-02 18:19",
"message": "SHIPMENT ARRIVED"
},
{
"status_code": "IT",
"location": "BAREJA EPU (NCX)",
"event_time": "2021-03-02 22:07",
"message": "SHIPMENT FURTHER CONNECTED"
}
]
}
}Thanks

Amit MohantyRank #112 · 20K reputationPosted Dec 28, 2022, 5:51 AM EST
@Pasang is right. Id you want to show both data you have to use nested gridview.
Please check attached code, it may help you.
Pasang TamangRank #449 · 5.6K reputationPosted Dec 28, 2022, 5:35 AM EST
Hi,
If you want to show both data and history in a single gridview then you have to use nested gridview. You can find detail about nested gridview here https://www.c-sharpcorner.com/blogs/nested-gridview-in-asp-net-using-c-sharp-parent-and-child-gridview.
Regards,
Pasang
Aravind GovindarajRank #430 · 5.8K reputationPosted Dec 28, 2022, 4:56 AM EST
Hi Ramco,
Cast it into an object and bind the required into grid view. for example if you want to display history in grid view, then assign only history collection in gird view, then bind it.
Ramco RamcoRank #462 · 5.4K reputationPosted Dec 28, 2022, 4:58 AM EST
Hi
I want to display both header & history data
Thanks