You will probably have to create a solution in the view using javascript. If you manually serialize the colModel
to send to the view, you will have to manually deserialize. You will not be able to parse it with a JSON
parser because it will not be a valid JSON
string.
One possible approach would be to use eval()
on the string like this:
myObject.property = eval("mysum");
It should replace the string with the function. I am not sure if it meets your needs, but will avoid both errors you listed above.