If I set to Visible the Footer of the grid, I get the exception "Value cannot be null ('Pen')" while the grid performs OnPaint.

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?
Edited by user
2025-06-12T12:47:31Z
|
Reason: Not specified