ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: forwheeler on November 21, 2013, 02:21:37 am

Title: JSON data and data index
Post by: forwheeler on November 21, 2013, 02:21:37 am
I an trying to send JSON from my MVC controller and display it in the grid. My JSON returning from the controller has camel case names such as FiscalYear. When I change the dataindx value to FiscalYear it fails to display the data. It seems to need the dataindx to be all lower case. Since I am returning an object it is inconvenient to lower case all keys.
Title: Re: JSON data and data index
Post by: paramvir on November 21, 2013, 11:39:02 am
Your dataIndx in colModel should also be FiscalYear.

There is no need for dataIndx to be all in lowercase.

Example:

http://jsfiddle.net/LAgZx/159/



Title: Re: JSON data and data index
Post by: forwheeler on November 21, 2013, 09:14:50 pm
Yes it seems you are correct. I thought I tried that before and it didn't work. I agree it would be a strange requirement. It is however case sensitive in that the index name needs to match the case of the incoming JSON which is ok too.