Why Page Init?

Hi,
I am trying to write a simple application which binds to a dataset and has the functionality of moving columns around and sorting them. My question is, if I place the code in the Page_Load, it does not work. However, if I place the code in the Page_Init it works just fine.

So basically my question is, why Page_Init? Why not Page_Load or anywhere for the databinding to occur?

Regards,
Ramesh Bhaskar


4 Replies

JA Janagan Syncfusion Team April 11, 2008 06:48 AM UTC

Hi Ramesh,

Thanks for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the issue. The dataset works fine with the page_Load event. Also, I have created a simple sample to test this issue and please refer the link below:

http://www.syncfusion.com/support/user/uploads/GGC_Update_171669a7.zip

Please try running this and if still the issue exists, could you please try reproducing it in the sample so that we could sort out the cause and provide you a solution?

Regards,
Janagan.



RB Ramesh Bhaskar April 11, 2008 03:28 PM UTC

Hi Janagan,
I tested out the code you sent me. Maybe an important piece of information that I left out was that I am using version 4.402.0.51 of the controls.

It gave me the same results as before. None of the functionality works when it is in the Page_Load event. However, when I move the code to the Page_Init event, it seems to work (even on the code in the sample you sent me).

Regards,
Ramesh Bhaskar

>Hi Ramesh,

Thanks for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the issue. The dataset works fine with the page_Load event. Also, I have created a simple sample to test this issue and please refer the link below:

http://www.syncfusion.com/support/user/uploads/GGC_Update_171669a7.zip

Please try running this and if still the issue exists, could you please try reproducing it in the sample so that we could sort out the cause and provide you a solution?

Regards,
Janagan.





RB Ramesh Bhaskar April 15, 2008 08:32 PM UTC

Any specific reason as to why Page Init? I have posted the version I am using currently.



JA Janagan Syncfusion Team April 16, 2008 02:00 PM UTC

Hi Ramesh,

Thanks for the update.

The page_init event works fine in 4.402.0.51 as the datasource is binded initially once. In the Page_load event,the viewstate of the datasourcecaching mode does not persist during each postback and the datasource needs to be rebinded everytime. But we have overcome this issue and the page_load event works fine in the latest releases. Please refer the link below for the latest release:

http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=72816

Please try running the sample in our latest release mentioned in the link above and let me know if this helps.

Thanks,
Janagan.



Loader.
Up arrow icon