Event orders

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

  1. My DataGrid's event handlers looks like:
    Page_Load()
    {
    ...// BREAKPONT PageLoad
    }

    Grid_ItemDataBound(...)
    {
    switch (e.Item.ItemType):
    {
    case ListItemType.Footer:
    ...// BREAKPONT FooterBound
    break;
    case ...// other item types
    }
    }

    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:
    PageLoad, PagerCreated, FooterBound, PagerCreated.
    I.e. Pager item created event raised 2 times!
    2. After postback they are called:
    PagerCreated, PagerCreated, PageLoad, 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. =?Utf-8?B?Q2hyaXM=?=

    printing processed orders automatically

    =?Utf-8?B?Q2hyaXM=?=, Mar 23, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    368
    =?Utf-8?B?Q2hyaXM=?=
    Mar 24, 2005
  2. lonelyplanet999
    Replies:
    8
    Views:
    429
    jerry
    Nov 19, 2003
  3. nntp
    Replies:
    2
    Views:
    434
    Chris Morris
    Sep 1, 2004
  4. Monu Agrawal

    Statement orders

    Monu Agrawal, Oct 2, 2005, in forum: Python
    Replies:
    5
    Views:
    292
  5. Replies:
    0
    Views:
    425
Loading...

Share This Page