We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTable' to type 'Syncfusion.Grouping.Record'

Hi,

If there is an incomplete new record and when i clicked on the other area of the GCC, all the other records become a non editable and it gives the bellow error message.

How i prevent bellow two'
1) Other cells should be keep as editable
2) Do not need to give an error message.


Thanks & Regards,
Sumudu

Attachment: GCCError_7e50fb88.zip

3 Replies

MG Mohanraj Gunasekaran Syncfusion Team August 10, 2016 01:45 PM UTC

Hi Sumudu, 

Thanks for using syncfusion product. 
We had analyzed your reported scenario at our end. The reported issue with “Unable cast exception” will be occurred if you are trying to cast the two different properties. We need some more details of your customization. Could you please provide us the simple sample which shows this behavior or modify the below attached sample to reproduce your scenario? It would be more helpful for us to provide better solution at the earliest. 
Sample link: GridGroupingControl   
Regards, 
Mohanraj G. 



SU sumudu June 19, 2017 10:57 AM UTC

Hi,

Bellow is the exception for above scenario. Can I have any update on this.

'AT.vshost.exe' (CLR v4.0.30319: AT.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
System.InvalidCastException: Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTable' to type 'Syncfusion.Grouping.Record'.
   at Syncfusion.Grouping.CurrentRecordManager.NavigateTo(Record record)
   at Syncfusion.Grouping.Record.SetCurrent(String fieldName)
   at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlSelectRecords.MouseDown(GridTableClickCellsEventArgs te)
   at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.ProcessTableClickCellsMouseDown(GridTableClickCellsEventArgs e)
   at Syncfusion.Windows.Forms.Grid.Grouping.GridTableClickCellsMouseController.MouseDown(MouseEventArgs e)
   at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseDown(MouseEventArgs e)
   at Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTableControlCellRenderer.OnMouseDown(Int32 rowIndex, Int32 colIndex, MouseEventArgs e)
   at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.RaiseMouseDown(Int32 rowIndex, Int32 colIndex, MouseEventArgs e)
   at Syncfusion.Windows.Forms.Grid.Grouping.GridTableClickCellsMouseController.MouseDown(MouseEventArgs e)
   at Syncfusion.Windows.Forms.MouseControllerDispatcher.ProcessMouseDown(MouseEventArgs e)
   at Syncfusion.Windows.Forms.ScrollControllMouseControllerDispatcher.ScrollControlBeforeMouseDown(Object sender, CancelMouseEventArgs e)
   at Syncfusion.Windows.Forms.CancelMouseEventHandler.Invoke(Object sender, CancelMouseEventArgs e)
   at Syncfusion.Windows.Forms.ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs e)
   at Syncfusion.Windows.Forms.Grid.GridControlBase.OnScrollControlMouseDown(CancelMouseEventArgs e)
   at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d)
catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0

Thank you



MG Mohanraj Gunasekaran Syncfusion Team June 20, 2017 04:21 PM UTC

Hi Sumudu, 
 
Thanks for your update. 
 
We have tried our best to reproduce your scenario as you mentioned in attached screenshot using below attached sample. But, we are unable to reproduce your scenario. Please provide your sample or modify the below attached sample to reproduce the issue. It will be helpful to provide the solution at the earliest. 
 
Sample link: GridGroupingControl 
 
Regards, 
Mohanraj G 


Loader.
Up arrow icon