Author Topic: JSON data and data index  (Read 4363 times)

forwheeler

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
JSON data and data index
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: JSON data and data index
« Reply #1 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/




forwheeler

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: JSON data and data index
« Reply #2 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.