I used the Combobox/Template example to build a RadComboBox with a RadTreeView as an ItemTemplate, but instead of a SqlDataSource I bound the tree in C# using a List<object>. The same tree works fine when it is by itself and shows all the data correctly, but when it is inside of the Item it is BLANK - the drop down is empty.
this is my front end code:
This is how I do the binding:
Am I doing anything wrong?
this is my front end code:
<
telerik:RadComboBox
ID
=
"rcbDrawing"
Width
=
"205px"
Height
=
"300px"
AllowCustomText
=
"true"
EmptyMessage
=
"Select A Drawing"
runat
=
"server"
Skin
=
"Outlook"
>
<
ItemTemplate
>
<
div
onclick
=
"StopPropagation(event)"
>
<
telerik:RadTreeView
ID
=
"treeDrawings"
runat
=
"server"
DataTextField
=
"Name"
DataValueField
=
"ID"
DataFieldID
=
"ID"
DataFieldParentID
=
"ParentID"
Skin
=
"Outlook"
OnClientNodeClicking
=
"OnTreeNodeClicking"
></
telerik:RadTreeView
>
</
div
>
</
ItemTemplate
>
<
Items
>
<
telerik:RadComboBoxItem
/>
</
Items
>
</
telerik:RadComboBox
>
This is how I do the binding:
RadTreeView treeDrawings = (RadTreeView)rcbDrawing.Items[0].FindControl(
"treeDrawings"
);
DrawingsCollection d = DrawingsCollection.GetByClientID(PageUser);
treeDrawings.DataSource = d;
treeDrawings.DataBind();
treeDrawings.ExpandAllNodes();
Am I doing anything wrong?