Jul 16, 2015, 11:02 AM
Exception using DirectEvents and label text edition (Ext.Net 3.2)
Hi everyone, first i want to thank you of making this project and this community. I wish you could help me with this problem. The code is very simple and i don't know where is the bug, also i did this in older Ext.Net versions and i never got stuck doing this.
Could you help me?
Thanks in advance
<ext:ComboBox runat="server"
ID="CB_Customer"
FieldLabel="Customer"
DisplayField="Name"
ValueField="CustomerID"
StoreID="ST_Customers"
QueryMode="Local"
ForceSelection="true"
TypeAhead="true"
Width="450">
<DirectEvents>
<Select OnEvent="OnCustomerSelectionChanged">
<EventMask Msg="Loading..." ShowMask="true"></EventMask>
</Select>
</DirectEvents>
</ext:ComboBox>
<ext:Label runat="server" ID="LB_CustomerTest" Html="TEST"></ext:Label>
protected void OnCustomerSelectionChanged(object sender, DirectEventArgs e)
{
LB_CustomerTest.Html = "ABC...";
}
Simply i wanted to modify label text when customers ComboBox selection has been changed. But this gives me an exception related to JSON serialization
[ArgumentNullException: Reference resolver cannot be null.
Nombre del parámetro: value]
Newtonsoft.Json.JsonSerializer.set_ReferenceResolver(IReferenceResolver value) +105
Newtonsoft.Json.JsonSerializer.ApplySerializerSettings(JsonSerializer serializer, JsonSerializerSettings settings) +1486
Newtonsoft.Json.JsonSerializer.CreateDefault(JsonSerializerSettings settings) +65
Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Type type, JsonSerializerSettings settings) +47
Newtonsoft.Json.JsonConvert.SerializeObject(Object value, JsonSerializerSettings settings) +44
Ext.Net.JSON.Serialize(Object obj, JsonSerializerSettings settings) +235
Ext.Net.JSON.Serialize(Object obj, IList`1 converters, IContractResolver resolver) +137
Ext.Net.JSON.Serialize(Object obj, IList`1 converters) +43
Ext.Net.TokenUtils.NormalizeRawToken(String script) +98
Ext.Net.TokenUtils.ParseAndNormalize(String script, Control seed) +56
Ext.Net.BaseControl.CallTemplate(ScriptPosition position, String template, String name, Object[] args) +283
Ext.Net.BaseControl.Call(ScriptPosition mode, String name, Object[] args) +54
Ext.Net.BaseControl.Call(String name, Object[] args) +50
Ext.Net.LabelBase.SetText(String text, Boolean encode) +155
Ext.Net.LabelBase.SetHtml(String html) +44
Currently Ext.Net is at version 3.2 (i tried 3.1, but give me the same problem) and Json.Net is at latest version too (7.0.1).Could you help me?
Thanks in advance