Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to plot data in a data grid with appropriate heading while I have data source

$
0
0

I have created a web service which stores the values in an array, But not able to show those data in an grid using XAML.

In Xamal.CS file I have created the following for loop to store the values from web service:-

RootObject weatherData = new RootObject();

weatherData = JsonConvert.DeserializeObject(weatherJson);

string[] dt = new string[weatherData.cnt];
double[] min_temp= new double[weatherData.cnt];
double[] max_temp = new double[weatherData.cnt];
double[] humidity = new double[weatherData.cnt];
string[] descrip = new string[weatherData.cnt];

for(int i=0;i< weatherData.cnt;i++)
{
min_temp[i] = weatherData.list[i].temp.min;

                max_temp[i] = weatherData.list[i].temp.max;

                humidity[i] = weatherData.list[i].humidity;

                descrip[i] = weatherData.list[i].weather[1].description;

                dt[i] = UnixTimeStampToDateTime(weatherData.list[i].dt);

            }

this weatherData is the root of my web service, How could I show the min_temp, max_temp, humidity, dt value using a data grid?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>