[CLOSED] Cannot deserialize JSON object into type 'Ext.Net.SelectedRowCollection'

  1. #1

    [CLOSED] Cannot deserialize JSON object into type 'Ext.Net.SelectedRowCollection'

    [JsonSerializationException: Cannot deserialize JSON object into type 'Ext.Net.SelectedRowCollection'.]
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue) +1749
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue) +92
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueNonProperty(JsonReader reader, Type objectType, JsonContract contract) +130
       Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType) +94
       Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +47
       Newtonsoft.Json.JsonSerializer.Deserialize(TextReader reader, Type objectType) +46
       Ext.Net.GridPanel.LoadPostData(String postDataKey, NameValueCollection postCollection) +468
       Ext.Net.PanelBase.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +53
       System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +8910120
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878
    I debug the ext.net source code
    Ext.Net\Ext\Grid\GridPanel.cs line 363
     if (this.SelectionModel.Primary is RowSelectionModel)
                    {
                        SelectedRowCollection ids = (SelectedRowCollection)serializer.Deserialize(sr, typeof(SelectedRowCollection));
                        (this.SelectionModel.Primary as RowSelectionModel).SetSelection(ids);
                    }
    but sr is
    {"RecordID":"ff75a118-ac53-40aa-846c-74012814d0d4","Name":"","RowIndex":3,"ColIndex":0}
    it's somthing wrong? this is happen radomly. when I open a gridpanel again
    Last edited by Daniil; May 29, 2011 at 9:18 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    when it's ok .the sr is:

    [{"RecordID":"ffee83eb-63cc-419b-97c6-1bdf589784ed","RowIndex":0},{"RecordID":"ff989b83-0a16-405a-abde-9ff23984c6bd","RowIndex":2},{"RecordID":"ff75a118-ac53-40aa-846c-74012814d0d4","RowIndex":3}]
    [] is missing?
    Last edited by Daniil; May 29, 2011 at 9:17 PM. Reason: Please use [CODE] tags
  3. #3
    it's my mistake.
    <Listeners>
                    <CellClick Handler=" if (columnIndex == 0) item.cellSelect('',rowIndex,columnIndex);" />
                </Listeners>
    I add this listeners to solved a js error
    Last edited by Daniil; May 29, 2011 at 9:16 PM. Reason: Please use [CODE] tags

Similar Threads

  1. [CLOSED] json deserialize problem
    By albayrak in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 21, 2015, 2:28 PM
  2. [CLOSED] JSON deserialize model fields to one nested object
    By boris in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 12, 2012, 10:51 AM
  3. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  4. [CLOSED] JSON.Deserialize Lastes SVN
    By egodoy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 21, 2010, 5:59 PM
  5. [CLOSED] [1.0] Ext.encode and JSON.Deserialize
    By state in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 14, 2010, 8:03 AM

Posting Permissions