Changing data type for Gantt Chart Task ID property
Hi,
Whenever I select a Gantt chart row, this error message pops up.
System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Int32'.
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.<>c__DisplayClass26_0.
at System.Collections.Generic.List`1.Find(Predicate`1 match)
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.RowSelectedHandler(RowSelectEventArgs`1 gridArgs)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)
at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.RowSelectedHandler(RowSelectEventArgs`1 gridArgs)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)
at Syncfusion.Blazor.Grids.Internal.Selection`1.SelectByRow(Row`1 rowToSelect, MouseAndKeyArgs evt)
at Syncfusion.Blazor.Grids.Internal.Selection`1.ValidateRowSelectionClick(Row`1 row, MouseAndKeyArgs e)
at Syncfusion.Blazor.Grids.Internal.Selection`1.RowSelectionClickHandler(MouseAndKeyArgs e, ValueTuple`3 target)
at Syncfusion.Blazor.Grids.Internal.Selection`1.ClickHandler(MouseEventArgs e, ValueTuple`3 target)
at Syncfusion.Blazor.Grids.Internal.GridCellBase`1.CellClickHandler(MouseEventArgs e, Boolean IsCheckBox)
at Syncfusion.Blazor.TreeGrid.Internal.TreeCell`2.
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
The ID value that I'm passing into the Gantt chart's Task ID property is of the long data type. How can I customize the Gantt chart property so that it would accept an ID value of type long? Please note that it is not an option to change the data type of our Task/Event ID to int from long.
Thanks!
Hi,
I checked the Release Notes and saw that this issue was said to have already been resolved. I upgraded the version of our Syncfusion Blazor library to v. 19.2.0.51. However, I am still getting the exception.
You can check it for yourself by running the attached razor code to your codebase.
Let me know what I can immediately do in order to resolve this without waiting for another patch without converting our data type from long to int.
Thanks!
Attachment: LongToIntExceptionWhenSelectingRowIssue_246fec8c.zip
- 5 Replies
- 4 Participants
-
RS Roy Sunga
- Jul 20, 2021 02:11 PM UTC
- Aug 5, 2021 12:21 PM UTC