CellSelectHandler Error after click cell in treegrid

Hi support Syncfusion,
I'm working on treegrid and i need event went cell click. i use CellSelected event. But after second click the error return via console.
This is my tree list:
<SfTreeGrid DataSource="@TreeData" @ref="gdv" IdMapping="Code" ParentIdMapping="ParentCode" TreeColumnIndex="1">
    <TreeGridSelectionSettings Type="SelectionType.Single" Mode="Syncfusion.Blazor.Grids.SelectionMode.Both"></TreeGridSelectionSettings>
    <TreeGridEditSettings AllowEditing="true" />
    <TreeGridColumns>

        <TreeGridColumn Field="Code" HeaderText="Code" Width="90"></TreeGridColumn>
        <TreeGridColumn Field="DisplayName" HeaderText="Name" Width="250">
        </TreeGridColumn>

        <TreeGridColumn Field="Col1" HeaderText="Col1" Width="60">
        </TreeGridColumn>
        <TreeGridColumn Field="Col2" HeaderText="Col2" Width="80">
        </TreeGridColumn>
       
    </TreeGridColumns>
    <TreeGridEvents CellSelected="CellSelectHandler" TValue="mModel">
    </TreeGridEvents>
</SfTreeGrid>
this is code:
public async void CellSelectHandler(CellSelectEventArgs<mModel> args)
{
                var EditCellIndex = JsonConvert.DeserializeObject<Dictionary<string, object>>(args.CellIndex.ToString());
                var CurrentEditCellIndex = 0;
                var CurrentEditRowIndex = 0;
                foreach (var key in EditCellIndex)
                {
                    if (key.Key == "rowIndex")
                    {
                        CurrentEditRowIndex = Convert.ToInt32(key.Value);
                    }
                    if (key.Key == "cellIndex")
                    {
                        CurrentEditCellIndex = Convert.ToInt32(key.Value);
                    }
                }
                var fied = await gdv.GetColumnFieldNames();
// other code ....
}

Error is: 
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'previousRowCellIndex', line 1, position 2678.
   at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsDouble()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Syncfusion.Blazor.BaseComponent.Trigger(String eventName, String arg)
Error: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'previousRowCellIndex', line 1, position 2678.
   at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsDouble()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Syncfusion.Blazor.BaseComponent.Trigger(String eventName, String arg)
    at Object.endInvokeDotNetFromJS (https://localhost:5001/_framework/blazor.server.js:8:31660)
    at e.<anonymous> (https://localhost:5001/_framework/blazor.server.js:8:103446)
    at https://localhost:5001/_framework/blazor.server.js:1:19202
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:19173)
    at e.processIncomingData (https://localhost:5001/_framework/blazor.server.js:1:17165)
    at e.connection.onreceive (https://localhost:5001/_framework/blazor.server.js:1:10276)
    at WebSocket.i.onmessage (https://localhost:5001/_framework/blazor.server.js:1:38091)

Can you resolve my code ? Thank you so much!

1 Reply

GL Gowri Loganathan Syncfusion Team April 27, 2020 09:01 AM UTC


Hi vusonhpvn, 
 
Thanks for contacting Syncfusion Forum. 
 

Query: CellSelectHandler Error after click cell in treegrid

We have validated the defect you have initiated with us. Thank you for taking the time to report the issue and helping us improve our product. At Syncfusion we are committed to fixing all the validated defect (subject to technological feasibility and Product Development Life Cycle) and including its fix in our subsequent release. So fix for the issue will be included in our upcoming Nuget release which is expected to be rolled out on 6th May, 2020.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    

Note: To view the above feedback, kindly login into your account.   

Kindly get back to us, if you need more assistance 

Regards, 
Gowri V L 
 


Loader.
Up arrow icon