How to load custom controls as part of the HTML layout?
9 Dec 2019 / 4 minutes to read
An HTML document containing custom controls is shown below.
<HTML>
<HEAD>
<TITLE>HTMLUI CUSTOM CONTROLS</TITLE>
<style>
.tttDisplay { text-decoration: none; color: #ffffff; font-family: Tahoma; font-size: 34pt; font-weight: bold; line-height: 30px; padding-left: 2px; }
</style>
</HEAD>
<BODY>
<TABLE id="CustomControls" cellSpacing="0" cellPadding="0" width="100%" bgColor="silver" border="1" height="100%" align="center">
<TR>
<TD class="tttDisplay" height="33%" width="100%" id="cctd1" vAlign="center">
<maskededittextbox id="maskedEditTextBox1" height="20" width="136">
</maskededittextbox>
</TD>
</TR>
<TR>
<TD class="tttDisplay" height="33%" width="100%" id="cctd2" vAlign="center">
<monthcalendar id="monthCalendar1" width="199" height="155"></monthcalendar>
</TD>
</TR>
<TR>
<TD class="tttDisplay" height="33%" width="100%" id="cctd3" vAlign="center">
<datagrid id="dataGrid1" width="304" height="144"></datagrid>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Private Sub htmluiControl1_PreRenderDocument(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.HTMLUI.PreRenderDocumentArgs)
Dim tab As Hashtable = New Hashtable()
tab = e.Document.ElementsByUserID
Dim maskedEditTextBoxElement1 As BaseElement = CType(IIf(TypeOf tab("maskedEditTextBox1") Is BaseElement, tab("maskedEditTextBox1"), Nothing), BaseElement)
Dim oTemp1 As CustomControlBase = New CustomControlBase(maskedEditTextBoxElement1, Me.maskedEditBox1)
Dim monthCalendarElement1 As BaseElement = CType(IIf(TypeOf tab("monthCalendar1") Is BaseElement, tab("monthCalendar1"), Nothing), BaseElement)
Dim oTemp2 As CustomControlBase = New CustomControlBase(monthCalendarElement1, Me.monthCalendar1)
Dim dataGridElement1 As BaseElement = CType(IIf(TypeOf tab("dataGrid1") Is BaseElement, tab("dataGrid1"), Nothing), BaseElement)
Dim oTemp3 As CustomControlBase = New CustomControlBase(dataGridElement1, Me.dataGrid1)
End Sub
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page