This is a migrated thread and some comments may be shown as answers.

Event sequence question

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 08 Jul 2008, 01:09 PM
I'm struggling to find the reference now, but at some point in the past I read a suggestion that it I was going to add controls (by which I mean RadControls) on-the-fly I should do so in the page's OnInit phase.

Given that I am doing the above, how, if at all is the event sequence shown here changed?

--
Stuart

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Jul 2008, 01:27 PM
Hi Stuart,

Generally if you want the controls to load and track their ViewState properly you should create these controls before LoadViewState(). OnInit actually is the place where ASP.NET will create statically declared controls in aspx/ascx.

The event sequence article is related mostly to EnableViewState grid property. The main difference is that RadGrid will call NeedDataSource for every page lifecycle in case of disabled ViewState.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or