Maurizio Maiorino
2025-06-10T14:29:29Z
If I set to Visible the Footer of the grid, I get the exception "Value cannot be null ('Pen')" while the grid performs OnPaint.
TenTec.png

Click to View Image3 View(s)



I noticed that the gridLineStyleParams6 variable in the following piece of code (decompiled from iGrid) has Pen set to null, because its Visible property is false. Unfortunately, the DrawLine is invoked regardless the visibility of LineStyle.

GridLineParams gridLineStyleParams6 = GetGridLineStyleParams(fVGridLinesStyle, null);
int num33 = num29 + (flag ? gridLineStyleParams6.Width : num) - gridLineStyleParams6.PenOffset;
g.DrawLine(gridLineStyleParams6.Pen, num33, num31, num33, num31 + num32 + gridLineStyleParams6.PenExtra);
if (gridLineStyleParams.Visible)
{
if (flag)
{
num29 += fVGridLinesStyle.Width;
}
num30 -= fVGridLinesStyle.Width;
}

Is there a workaround?
Igor/10Tec
2025-06-12T14:51:29Z
We have never seen such a problem and definitely need a sample to reproduce it. Can you send it to our main support email address?