LoadComplete event with PerformSelect event

Posts   
 
    
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 18-Jul-2011 22:45:59   

Greetings,

LLBL v3.1 SQL2008 Adapter ASP.net 4.0

As I understand, the LoadComplete event raise after all other controls on the page be loaded. But I have an issue here, I have web page that contains Controls GridView control LLBLGenProDataSource21 (Live persistence set to false)

Events Page_Load Page_LoadComplete LLBLGenProDataSource21_PerformSelect

I notes that "LLBLGenProDataSource21_PerformSelect" event fires **AFTER ** Page_LoadComplete event.

Could you please clarify why this behavior happens ??

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Jul-2011 05:01:29   

I think that is expected. The cycle of a page and controls on it is globally this - page loads - controls are instantiated and added to the page, e.g. grid and datasource control - state is loaded into the control instances - binding is setup between controls

After all PerfomSelect is triggered by the databinding setup in the grid control, so it's need to be loaded first.

David Elizondo | LLBLGen Support Team
mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 19-Jul-2011 08:31:26   

daelmo wrote:

The cycle of a page and controls on it is globally this - page loads - controls are instantiated and added to the page, e.g. grid and datasource control - state is loaded into the control instances - binding is setup between controls

After all PerfomSelect is triggered by the databinding setup in the grid control, so it's need to be loaded first.

So after that LoadComplete event should be fired, The life-cycle scenario in this case should be

1- Page_Load 2- PerformSelect 3- LoadComplete

Is it correct ?? (if no why)

(Ref) http://msdn.microsoft.com/en-us/library/ms178472.aspx#lifecycle_events

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 19-Jul-2011 09:16:44   

Please check again the Link you have posted.

Check the chart , there is a Pre-rendering section in the Chart. There you can find that OnLoadComplete is called before Databinding events.

If you want an event that is called after databinding events, that's the PreRenderComplete.

mohamed avatar
mohamed
User
Posts: 136
Joined: 10-Mar-2008
# Posted on: 19-Jul-2011 10:28:49   

ohh.. sorry for miss understanding