In my pivot grid, in pgc_CustomDrawFieldHeader(sender, e)
for certain fields, exception Index was out of range. Must be non-negative and less than size of collection
is fired in e.Field
property. This will result to the pivot grid not being rendered. I am looking for some ways to not get the error or at least exit the method if e.Field
has exception. I need to use e.Field
and e.Field.Tag
from DevExpress.XtraPivotGrid.PivotCustomDrawFieldHeaderEventArgs
.
Pivot grid CustomDrawFieldHeader method showing System.ArgumentOutOfRangeException on e.Field property
122 views Asked by KriSakya At
1
you can try moving your code to the _Init event
See this page as a reference https://www.devexpress.com/Support/Center/Question/Details/Q413762/index-was-out-of-range-must-be-non-negative-and-less-than-the-size-of-the-collection