OnItemCreated and OnItemDataBound called too many times?

Discussion in 'ASP .Net Datagrid Control' started by Pete Coolidge, Jul 4, 2003.

  1. Has anyone run into the problem where OnItemCreated and/or OnItemDataBound
    is called twice as many times as necessary?

    If I have a grid with 4 rows of data I would expect these methods to be
    called 6 times each (including calls for header and footer).

    I often see 8 calls (not including the additional calls for the header and
    footer). I don't have AlternatingItems turned on.

    These extra calls screw up my rowIndex counter that I use to keep track of
    and add attributes to each row.

    I haven't been able to narrow down when exactly this happens. It seems very
    random. I'm just wondering if anyone has run into this before.

    Thanks,
    Pete
     
    Pete Coolidge, Jul 4, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. djskrill
    Replies:
    9
    Views:
    714
    djskrill
    Oct 1, 2003
  2. Apricot
    Replies:
    4
    Views:
    556
    velthuijsen
    Apr 16, 2004
  3. Radu
    Replies:
    7
    Views:
    725
    charlie_Stell
    Aug 28, 2009
  4. Bernal Schooley

    Problem with OnItemCreated and InitializePager being called four times

    Bernal Schooley, Apr 5, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    195
    Bernal Schooley
    Apr 5, 2004
  5. bgold12
    Replies:
    1
    Views:
    144
    Thomas 'PointedEars' Lahn
    Aug 10, 2008
Loading...

Share This Page