Event handlers called multiple times

Discussion in 'ASP .Net Datagrid Control' started by Tumurbaatar S., Nov 11, 2005.

  1. My DataGrid's event handlers looks like:
    Grid_ItemDataBound(...)
    {
    switch (e.Item.ItemType):
    {
    case ListItemType.Footer:
    ...// BREAKPONT FooterBound
    break;
    case ...// other item types
    }
    }

    and

    Grid_ItemCreated(...)
    {
    if (e.Item.ItemType == ListItemType.Pager)
    {
    ...// BREAKPONT PagerCreated
    }
    }

    During debug session I put 2 breakpoints as shown above. And I noted strange
    things:
    1. On the first time, events are called in this order: PagerCreated,
    FooterBound, PagerCreated.
    I.e. Pager item created event raised 2 times!
    2. After postback they are called: PagerCreated, PagerCreated, PagerCreated,
    FooterBound, PagerCreated
    Now Pager item created event raised 4 times!!!

    What is happening?

    P.S. Can anybody recommend me any reference about event calling in ASP.NET
    which explains all above things?
    Tumurbaatar S., Nov 11, 2005
    #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:
    691
    djskrill
    Oct 1, 2003
  2. Apricot
    Replies:
    4
    Views:
    517
    velthuijsen
    Apr 16, 2004
  3. =?Utf-8?B?UHJhc2FubmEgUGF0dGFt?=

    Profile Personalize event called Multiple times

    =?Utf-8?B?UHJhc2FubmEgUGF0dGFt?=, Jun 19, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    448
    =?Utf-8?B?UHJhc2FubmEgUGF0dGFt?=
    Jun 20, 2006
  4. Radu
    Replies:
    7
    Views:
    700
    charlie_Stell
    Aug 28, 2009
  5. Felix
    Replies:
    1
    Views:
    331
    Felix
    Sep 29, 2006
Loading...

Share This Page