Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hello, I have found a very frustrating bug in the grid. It took me many hours to figure out what was the issue. I would like to report my findings here. 

Attached you will find a test project that has been highly simplified.
You will also find a video recording of me doing the thing that crash the grid. The bug is sooo unbeliveable that I had to capture it in video. 

so far I found that both 18.3.0.47 and 18.1.0.52 are affected. 

Basically
if you enable a table summary
and you set it to bottom
and you filter on an item
depending on what cell was selected, and also other factor that I could not figure out
the grid will throw when applying the filter from either the UI through the checkbox selection list, or the direct input or even when doing through code. 

In case of code, if you follow this example "

var pre = new FilterPredicate()
{
FilterBehavior = FilterBehavior.StronglyTyped,
FilterType = FilterType.Equals,
FilterValue = value
};

(Syncfusion.Winform.DataGrid.Column)selectedColumn?.FilterPredicates.Add(pre);
", it will crash directly on the like .Add(pre);

here is the full stack trace. 

System.ArgumentOutOfRangeException
  HResult=0x80131502
  Message=L'index était hors limites. Il ne doit pas être négatif et doit être inférieur à la taille de la collection.
Nom du paramètre : index
  Source=mscorlib
  StackTrace:
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Syncfusion.Data.RecordsListBase.GetRecord(Int32 index)
   at Syncfusion.Data.RecordsListBase.get_Item(Int32 index)
   at Syncfusion.WinForms.DataGrid.GridPainter.DrawCell(Graphics graphics, Rectangle rect, DataColumnBase column, Object cellValue, String formattedText)
   at Syncfusion.WinForms.DataGrid.GridPainter.DrawColumn(Graphics graphics, Rectangle finalSize, DataRowBase dataRow, IEnumerable`1 columns)
   at Syncfusion.WinForms.DataGrid.GridPainter.DrawDefaultRow(Graphics graphics, DataRowBase dataRow, Rectangle finalSize)
   at Syncfusion.WinForms.DataGrid.GridPainter.DrawRow(DataRowBase dataRow, Rectangle finalSize, Graphics graphics)
   at Syncfusion.WinForms.DataGrid.GridPainter.DrawRows(Graphics graphics)
   at Syncfusion.WinForms.DataGrid.GridPainter.OnPaint(PaintEventArgs e, Size clientSize)
   at Syncfusion.WinForms.DataGrid.TableControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Syncfusion.WinForms.Controls.SfScrollControl.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Here is my little test run from the video
test run
select nothing, filter on 0
select nothing, filter on 1, 
select nothing, filter on 2, 
select 0, filter on 0
select 0, filter on 1
select 0, filter on 2, 
select 1, filter on 0 crash
select 1, filter on 1 crash
select 1, filter on 2 crash
select 1, filter on 3 crash
select 2, filter on 0
select 2, filter on 1
select 2, filter on 2
select 2, filter on 3
select 2, filter on 0 and 1 crash
select 2, filter on 0 and 1 and 2
select 2 filter on 1 and 2 crash
select 2 filter on 1 and 4 crash

select nothing, equals on 1
select 0, equals on 1
select 1, equals on 1 crash
select 2, equals on 1

------------

workaroud that I found was to either disable the table summary, or set it to Position = VerticalPosition.Top,

ShowSummaryInRow to true or fase change nothing. 
The type of data inside the columns change nothing. I had the issue on string and integer column. 
which position you selected and how many rows there are seems to change the behaviour but not always. 



Thank you for you help on this.