Sep 14, 2011, 2:53 PM
JsonserializationException- error due converting data
Hi..
I'm getting the JsonserializationException "Error coverting value "" to type 'System.Integer'". I'm passing #{storeCandDetail}.getChangedData() from the client side to server side,so I'm passing that string to the method on server side:
Thanks,
Aleks (the new guy in ext.net) :)
I'm getting the JsonserializationException "Error coverting value "" to type 'System.Integer'". I'm passing #{storeCandDetail}.getChangedData() from the client side to server side,so I'm passing that string to the method on server side:
public void SaveRecord(string changedCandData)
{
StoreDataHandler sdh = new Ext.Net.StoreDataHandler("{"+changedCandData+"}");
Ext.Net.ChangeRecords<Business.Entities.Cand> messagesCand = sdh.ObjectData<Business.Entities.Cand>();
foreach (Business.Entities.Cand cnd in messagesCand .Updated)
{
cnd.Save();
}
}
The exception appears on Ext.Net.ChangeRecords<Business.Entities.Cand> messages = sdh.ObjectData<Business.Entities.Cand>(). I know this is happening because the object doesn't contain all valid type of data and doesn't contain all required properties Cand object need to have. But, I'm not sure how to check this? Is there a way to do some conversions before making messagesCand type in my SaveRecord method?Thanks,
Aleks (the new guy in ext.net) :)
Last edited by geoffrey.mcgill; Sep 14, 2011 at 4:25 PM.
Reason: please use [CODE] tags