0

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.

neeh
  • 2,777
  • 3
  • 24
  • 32
KriSakya
  • 1
  • 1

1 Answers1

0

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

Victor Hugo Terceros
  • 2,969
  • 3
  • 18
  • 31