locked
Asp.Net GridView control Events Secuence RRS feed

  • Question

  • User1557998713 posted

    I need to know the complete cycle of Life (sequence of events) of the Asp.Net GridView control.

    Saturday, July 18, 2020 5:11 AM

Answers

  • User288213138 posted

    Hi zequion,

    I need to know the complete cycle of Life (sequence of events) of the Asp.Net GridView control.

    There are a lot of events which are raised during the GridView life cycle and, depending on a scenario, some of them may be raised differently. So, it's difficult to provide you with a precise list of their order. In general, as any other control in ASP.NET, the gridview goes through the Control Execution Lifecycle.

    If you need more information about some special events and their usage, feel free to ask additional questions and elaborate on the specifics you want to know. We are here to answer.

    Best regards,

    sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 20, 2020 6:45 AM

All replies

  • User475983607 posted

    I need to know the complete cycle of Life (sequence of events) of the Asp.Net GridView control.

    The official documentation and the event names explain/indicate when similar events fire.  The follow SO post took the time to figure the main events that fire when binding a GridView.

    https://stackoverflow.com/questions/29031962/list-the-order-of-gridview-events-in-asp-net

    You have to understated that not all events fire.  Sort events fire when a user clicks a sort column.  Data bound events happen when DataBind() is called.

    Your question indicates a design issue.  Can you explain why the order of events matter?

    Saturday, July 18, 2020 12:45 PM
  • User288213138 posted

    Hi zequion,

    I need to know the complete cycle of Life (sequence of events) of the Asp.Net GridView control.

    There are a lot of events which are raised during the GridView life cycle and, depending on a scenario, some of them may be raised differently. So, it's difficult to provide you with a precise list of their order. In general, as any other control in ASP.NET, the gridview goes through the Control Execution Lifecycle.

    If you need more information about some special events and their usage, feel free to ask additional questions and elaborate on the specifics you want to know. We are here to answer.

    Best regards,

    sam

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 20, 2020 6:45 AM
  • User1557998713 posted

    This link shows the events of the GridView class. What I do not know is the order of execution of events that are not directly produced by the user.

    https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.gridview?redirectedfrom=MSDN&view=netframework-4.8#events

    Monday, July 20, 2020 10:22 AM
  • User288213138 posted

    Hi zequion,

    This link shows the events of the GridView class. What I do not know is the order of execution of events that are not directly produced by the user.

    I mentioned above, there are a lot of events which are raised during the GridView life cycle and, depending on a scenario, some of them may be raised differently. So, it's difficult to provide you with a precise list of their order.

    Best regards,

    Sam

    Tuesday, July 21, 2020 8:11 AM