Hi There, I have a JSON output (from WCF service) that I need to bind to a data grid. The Json i am getting is the result of a query that is dynamic. Due to this reason, I am able to cast the Json into an object. I wanted to check if someone else has implemented this. Thanks Jay
Hi Greg,
Awesome! I'm glad that helped.
Thanks Rob. Works great!! I just needed to account for the zeros.
The XamGrid only shows summaries that will work with the associated data type of the column. In the case of this JSON sample, each column is dealing with string values so the summaries available are only the ones that can handle a string. The Sum or Average summaries won't know what to do with a string. So pretty much the only way to get a Sum or Average summary to show up is to either provide a strongly typed object which will only work if you know what JSON you are getting, or you can create a custom summary and do the calculation yourself, converting the JSON value into the appropriate datatype. I updated the sample to provide a custom summary.
Please keep in mind that the sample was made 2 years ago in VS2010 but I no longer have 2010 installed on my machine, only VS 2013. So this is what the sample is built in. I also made use of the Json.NET library to make deserializing the json a bit easier.
Hi Rob,
I had the same issued and followed your example worked great. However I have one further requirement. I need to add SUM and AVERAGE to my summaries when the column contains numeric values. Currently I only get count, maximum, minimum. I have enabled all the summaries options I can think of. Converted the numbers to decimals and rounded to two decimal places. Nothing I do shows the SUM and AVERAGE operands in the summaries list. Any chance you could update this example to also include summaries.
Thanks, Greg
Thanks Rob for your help. This is all I was looking for, you can close this request. Jay