In my webpage, I have a RadTabStrip containing RadTab:s which will decide which page view the webpage that is shown.
<
telerik:RadTabStrip
ID
=
"rtsTabs2"
runat
=
"server"
Width
=
"100%"
MultiPageID
=
"rmpMultiPage2"
AutoPostBack
=
"True"
SelectedIndex
=
"0"
OnTabClick
=
"rtsTabs2_TabClick"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Page 1"
PageViewID
=
"pvPage1"
/>
<
telerik:RadTab
Text
=
"Page 2"
PageViewID
=
"pvPage2"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
The page views are defined like this:
<
telerik:RadMultiPage
ID
=
"rmpMultiPage2"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"pvPage1"
runat
=
"server"
> RadGrids etc </
telerik:RadPageView>
<telerik:RadPageView
ID
=
"pvPage2"
runat
=
"server"
> More RadGrids etc </
telerik:RadPageView
>
</
telerik:RadMultiPage
>
The page views contains numerous components that will be populated from the database.
However, I will only be interested in populate those when a page view containing them is displayed.
Which event should I listed at to determine when to populate components?
- The OnLoad event in RadPageView is triggered when the page load, regardless if the page view is shown or not.
- The OnPreRender event in RadPageView is also triggered on page load.
- The OnNeedDataSource event in GridView is the same, the event triggers when the page loads.
- Using Visible="False" in a RadPageView only results in page views that will never show up even if the corresponding RadTab is clicked.