Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
How to populate dynamic Json string to Xamdatagrid without having model class?
posted

Previously i was Deserialize json to model class as below:

public class Product{

public string ProductName {get; set;}

public string ProductID {get; set;}

}

var result = await DeserializeJson<Ienumrable<Product>>(jsonString)

But now our objective is we do not want this model class anymore. This is because it is not a good way if later in future the web api is updated or got changes so the client side need to change as well in the model class. We do not want to rely on that anymore instead of make it to be auto generated.

We changed the deserialization to be as below:

*not use Product class model anymore.

var result = await DeserializeJson<dynamic>(jsonString)

In Viewmodel

the datasource is define as ObservableCollection for Xamdatagrid.

While trying to populate the datasource to the results above got error as because xamdatagrid cannot digest the Json string value.

Parents Reply Children
No Data