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
close icon

CheckBottomForIndentCell Exception

Hello,
I encounter an exception which seems to happen quite randomly in SfDatagrid, can you please help me to solve it (it is bound to a binding list with filtering, sorting and grouping enabled) ?

Exception: System.NullReferenceException

Method : Boolean CheckBottomForIndentCell(Syncfusion.WinForms.DataGrid.DataRowBase, Syncfusion.WinForms.DataGrid.DataColumnBase)


Full StackTrace :
Syncfusion.WinForms.DataGrid.GridPainter.CheckBottomForIndentCell(DataRowBase dataRow, DataColumnBase column)
Syncfusion.WinForms.DataGrid.GridPainter.DrawColumn(Graphics graphics, Rectangle finalSize, DataRowBase dataRow, IEnumerable`1 columns)
Syncfusion.WinForms.DataGrid.GridPainter.DrawDefaultRow(Graphics graphics, DataRowBase dataRow, Rectangle finalSize)
Syncfusion.WinForms.DataGrid.GridPainter.DrawRow(DataRowBase dataRow, Rectangle finalSize, Graphics graphics)
Syncfusion.WinForms.DataGrid.GridPainter.DrawRows(Graphics graphics)
Syncfusion.WinForms.DataGrid.GridPainter.OnPaint(PaintEventArgs e, Size clientSize)
Syncfusion.WinForms.DataGrid.TableControl.OnPaint(PaintEventArgs e)
System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
System.Windows.Forms.Control.WmPaint(Message& m)
System.Windows.Forms.Control.WndProc(Message& m)
Syncfusion.WinForms.Controls.SfScrollControl.WndProc(Message& msg)
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


5 Replies

MA Mohanram Anbukkarasu Syncfusion Team December 6, 2019 01:37 PM UTC

Hi Florian,   
  
Thanks for contacting Syncfusion support.    
  
Sorry for the inconvenience. We are unable to reproduce the reported issue in our end. As you have mentioned it as occurring randomly, the provided stack trace is not sufficient to reproduce the issue. We have checked the method specified in the stack trace and there are no possibilities for getting Null Reference Exception in it. It is hard for us to reproduce the issue with the provided details.    
  
If possible, please provide us your issue reproducible sample or else the SfDataGrid settings you have used in your application with proper code snippet and a screenshot of your application and provide the scenario in which you are facing the issue. (For example, while performing grouping or anything like that). These details will help us to reproduce the reported issue in our end, so that we can find the exact cause for the issue and provide a prompt solution at the earliest.    
  
Regards,   
Mohanram A.   



DS Dev Staff December 6, 2019 01:39 PM UTC

Hello, 
It will be hard for us to provide more details but it seems to happen on form closing and our user get it randomly. We were also unable to reproduce it on our side...
Best regards and thank you.


MA Mohanram Anbukkarasu Syncfusion Team December 9, 2019 10:37 AM UTC

Hi Florian,  
   
Thanks for the update.  
   
We have created a new incident under your Direct trac account to follow up with this query. We suggest you to follow up with the incident for further updates. Please log in using the below link.   
   
Regards,  
Mohanram A.  



AI AIPEX March 14, 2024 02:03 PM UTC

Hi I'm also having the same random issue,   

The error is happening in the method  CheckBottomForIndentCell as you can see by the error.  I know you mentioned the code looks like it shouldn't throw an exception, but it does randomly,  no way of consistently reproducing.  I believe the issue is the tableControl being null as the grid could be refreshing or the datasource being nulled out and re-added.

this is what causes it for me to happen the most is when we drop and re-add the datasource,  not going into reason we do this. but this is usually what causes the issue.





CM Chidanand Murugaiah Syncfusion Team March 15, 2024 05:56 PM UTC

HI AIPEX,


We are tried to replicate the reported NullReferenceException exception on our end. Unfortunately, we are unable to replicate the reported scenario. We prepared a simple sample and attached with this response. If you have any additional information or steps that could help us replicate the problem, please let us know. We are committed to resolving this issue and will continue to work diligently to find a solution. Thank you for your understanding.


Regards,

Chidanand M.


Attachment: SfDataGrid_Demo_4_8_c92df49e.zip

Loader.
Live Chat Icon For mobile
Up arrow icon