Hi
How to display below data in Gridview
{
"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 MohantyPosted Dec 28, 2022, 10:51 AM
@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 TamangPosted Dec 28, 2022, 10:35 AM
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
Ramco RamcoPosted Dec 28, 2022, 9:58 AM
Hi
I want to display both header & history data
Thanks
Aravind GovindarajPosted Dec 28, 2022, 9:56 AM
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.