Hello,
I am using Flexigrid in my project to add a button on the grid toolbar I can use code like this:
...
"buttons":[
{"name":"Modifica","bclass":"edit","onpress":"doCommand"},
{"name":"Elimina","bclass":"delete","onpress":"doCommand"}
],
...
Anyway the "onpress" attribute shall contain a reference to a js callback and so this field shall not be enclosed within quotation marks.
I am using the class JavaScriptSerializer (in the System.Web.Script.Serialization namespace) to do the serialization.
How I have to declare the variable to make JavaScriptSerializer serialize like this?
...
"buttons":[
{"name":"Modifica","bclass":"edit","onpress":doCommand},
{"name":"Elimina","bclass":"delete","onpress":doCommand}
],
...
Thanks for helping!