Dear Sir
JSON to Bind Gridview
I have tried to Bind, But unable to do it.
This is the Body
{
"code":200,
"message":"Success",
"onlineDataList":[
{
"address":"Perumpavur kotamanagalam road / Muvattupula/Ernakulam / KL",
"dailyMileage":"0",
"dateTime":1629666658000,
"engine":false,
"freeWheelAlert":false,
"gpsdate":"23-08-2021 02:40:58",
"haltDuration":"2281",
"harshBrakeAlert":false,
"idleAlert":false,
"latitude":"9.929176",
"longitude":"76.577295",
"odometer":873894,
"overSpeedAlert":false,
"speed":0,
"temperature":"26.5",
"unitId":"100064",
"vehicleId":"KA42A278"
},
{
"address":"CMB Hub / TN",
"dailyMileage":"115.61",
"dateTime":1629696913000,
"engine":false,
"freeWheelAlert":false,
"gpsdate":"23-08-2021 11:05:13",
"haltDuration":"305",
"harshBrakeAlert":false,
"idleAlert":false,
"latitude":"10.945945",
"longitude":"76.997642",
"odometer":862587,
"overSpeedAlert":false,
"speed":0,
"temperature":"",
"unitId":"100066",
"vehicleId":"KA42A277"
},
{
"address":"2.67KMs from Podanur/Station road / TN",
"dailyMileage":"87.15",
"dateTime":1629696905000,
"engine":false,
"freeWheelAlert":false,
"gpsdate":"23-08-2021 11:05:05",
"haltDuration":"174",
"harshBrakeAlert":false,
"idleAlert":false,
"latitude":"10.94286",
"longitude":"76.999238",
"odometer":683275,
"overSpeedAlert":false,
"speed":0,
"temperature":"38.0",
"unitId":"100067",
"vehicleId":"KA42A7504"
},
{
"address":"CMB Hub / TN",
"dailyMileage":"0",
"dateTime":1629685546000,
"engine":false,
"freeWheelAlert":false,
"gpsdate":"23-08-2021 07:55:46",
"haltDuration":"1101",
"harshBrakeAlert":false,
"idleAlert":false,
"latitude":"10.945816",
"longitude":"76.997607",
"odometer":2771595,
"overSpeedAlert":false,
"speed":0,
"temperature":"24.0",
"unitId":"100201",
"vehicleId":"KA42A9832"
}
],
"vehicleId":"ALL"
}
IRestResponse response = client.Execute(request);
string ms = response.Content;
root EResponse = JsonConvert.DeserializeObject<root>(ms);
if (EResponse.message.ToString() == "Success")
{
GridView1.DataSource = EResponse.result.vehicleId;
GridView1.AutoGenerateColumns = true;
if (GridView1 != null)
{
}
}