Changing data type for Gantt Chart Task ID property

Hi,

Whenever I select a Gantt chart row, this error message pops up.

Unhandled exception rendering component: Unable to cast object of type 'System.Int64' to type 'System.Int32'.
System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Int32'.
at Syncfusion.Blazor.Gantt.Internal.TreeGridPane`1.<>c__DisplayClass26_0.b__0(GanttRowData`1 chartRow)
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.b__0_5(MouseEventArgs e)
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!


5 Replies

PP Pooja Priya Krishna Moorthy Syncfusion Team July 21, 2021 07:50 AM UTC

Hi Denzel, 
 
We are sorry for the inconvenience caused. 
We are able to replicate the reported error. We will validate more on this and update you further details in one business day.(July 22, 2021). 
Until then we appreciate your patience. 
 
Regards, 
Pooja K 



MS Monisha Sivanthilingam Syncfusion Team July 22, 2021 12:36 PM UTC

Hi Denzel, 
 
Thank you for your patience. 
 
We have analyzed the reported issue and have considered it as a bug from our side. We have logged a bug report for it and you can track its status from the below feedback link. 
 
 
The fix will be provided in the 2021 Volume 2 SP release scheduled for the mid of August, 2021. 
 
We appreciate your patience until then. 
 
Regards, 
Monisha. 



RS Roy Sunga August 3, 2021 10:47 PM UTC

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


AK Alagumeena Kalaiselvan Syncfusion Team August 4, 2021 02:40 PM UTC

Hi Denzel, 
  
We regret to inform you that due to some technical issue the fix for issue “console error thrown when the TaskId given as Long type” could not be included in latest package version 19.2.51. So, we will provide the alternate solution by tomorrow 5th August, 2021. 
  
Regards 
Alagumeena.K 



MS Monisha Sivanthilingam Syncfusion Team August 5, 2021 12:21 PM UTC

Hi Denzel, 
 
Thank you for your patience. 
 
We have generated custom nugets including the fix for the issue “Console error thrown when TaskId is given Long type” in version v19.2.0.56. Please find the nugets from the below link. 
 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon