What is the event sequence of grid OnPreRender? Will it be fired only once or every time there is a postback?
When the grid is ajaxified, will OnPreRender be fired every time when there is a postback?
I'm asking this because when postback my breakpoint in Grid OnPreRender is not hit after Page_PreRender event when the grid is ajaxified.
Thanks.
In ASP.NET Web Forms, the event sequence for a control's lifecycle, including the RadGrid control, is crucial for understanding how events are triggered and handled. Specifically, the OnPreRender event is part of this lifecycle.
Here are a few things to consider when debugging the issue you're facing:The OnPreRender event occurs after the Page_Load event and before the Page_PreRender event. It is raised when the server control is about to render to the client. This event is fired during every postback and not just once during the initial page load. This means that if there is a postback, the OnPreRender event will be fired again.
If you are working with AJAX in ASP.NET Web Forms, whether using the built-in ASP.NET AJAX library (UpdatePanels) or a jQuery AJAX, the behavior can vary based on how the AJAX updates are handled.
When a control, such as the Grid is ajaxified, its lifecycle events still occur, but they might behave differently in the context of AJAX updates. In some cases, depending on the specifics of how the AJAX update is implemented, the OnPreRender event might not fire as expected during a partial postback, which could explain why your breakpoint is not being hit.