I found this example:
<telerik:RadDatePicker
ID="RadDatePicker1"
runat="server">
<DateInput Width="100%"></DateInput>
<Calendar
CellAlign="Center"
CellVAlign="Middle"
DayNameFormat="FirstLetter"
FirstDayOfWeek="Default"
MonthLayout="Layout_7columns_x_6rows"
Orientation="RenderInRows"
TitleAlign="Center"
UseColumnHeadersAsSelectors="False"
ShowRowHeaders="False">
</Calendar>
<DatePopupButton
CssClass="radPopupImage_Default"
BorderColor="#D0E1F2"
BorderStyle="Solid"
BorderWidth="1px" />
My assumption is that inside the RadDatePicker there is a DateInput object, Calendar Object and DatePopupButton object.
I would like to have my own custom control that allows access to an inner object e.g.
<jonno:textbox id="txt1" runat="server"><FieldConfig fieldName="Input1"/></jonno:textbox>
Ideally I don’t want the FieldConfig class to be a visual class but it’s ok if it is.
How can I achieve this?
The embedded custom tags are properties of your control. To enable setting them in markup, you need to decorate your control and properties with the following attributes:
Example from a control I use that does something similar:
Look the attributes up on msdn to read up on what they do exactly. The above should do what you need it to do though.
In markup I can then simply assign the two views:
THe only difference is that my properties are still WebControls and take more child controls. It shouldn´t matter though, as long as you set your attributes right.
Menno