KaxMultiPagePageViewCreated Event |
Occurs when page views are added programmatically to the KaxMultiPage control. It also occurs after postback when
the KaxMultiPage control recreates its page views from ViewState.
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic event KaxMultiPageEventHandler PageViewCreated
Public Event PageViewCreated As KaxMultiPageEventHandler
public:
event KaxMultiPageEventHandler^ PageViewCreated {
void add (KaxMultiPageEventHandler^ value);
void remove (KaxMultiPageEventHandler^ value);
}
member PageViewCreated : IEvent<KaxMultiPageEventHandler,
KaxMultiPageEventArgs>
Value
Type:
Kettic.AspNet.ControlsKaxMultiPageEventHandler
Remarks
Use this event when you need to create page views from code behind. Controls added dynamically should be created in
the PageViewCreated event handler.
Examples
The example below starts by defining a dynamic page view and adding a control (i.e.
Label) to the new page view.
protected void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
PageView view = new KaxPageView();
view.ID = "dynamicPageView";
KaxMultiPage1.PageViews.Add(view);
}
}
protected void KaxMultiPage1_PageViewCreated(object sender, Kettic.AspNet.Controls.KaxMultiPageEventArgs e)
{
Label l = new Label();
l.ID = "dynamicLabel";
l.Text = "Programatically created label";
e.PageView.Controls.Add(l);
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not Page.IsPostBack Then
Dim view As PageView = New KaxPageView()
view.ID = "dynamicPageView"
KaxMultiPage1.PageViews.Add(view)
End If
End Sub
Protected Sub KaxMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As Kettic.AspNet.Controls.KaxMultiPageEventArgs) Handles KaxMultiPage1.PageViewCreated
Dim l As New Label()
l.ID = "dynamicLabel"
l.Text = "Programatically created label"
e.PageView.Controls.Add(l)
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also