Hi team,
I am having listview, I want to add treeview inside listview.
And the listview should be combobox same like in this demo
Please help me how to do this.
aspx page
<
telerik:RadListView
ID
=
"rlvUsers"
runat
=
"server"
ItemPlaceholderID
=
"EmployeesContainer"
DataKeyNames
=
"userid"
OnItemDataBound
=
"rlvUsers_ItemDataBound"
>
<
LayoutTemplate
>
<
fieldset
>
<
legend
>New Employees - Manage Profiles</
legend
>
<
asp:PlaceHolder
ID
=
"EmployeesContainer"
runat
=
"server"
></
asp:PlaceHolder
>
</
fieldset
>
</
LayoutTemplate
>
<
ItemTemplate
>
<
fieldset
>
<
legend
class
=
"gray"
><%#Eval("fullName")%></
legend
>
<
table
style
=
"line-height: 30px; padding: 60px; width: 100%"
>
<
tr
>
<
td
style
=
"width: 120px"
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
CssClass
=
"ax-text-gray"
Text
=
"Employee Code"
></
asp:Label
>
</
td
>
<
td
>
<
asp:Label
ID
=
"Label2"
runat
=
"server"
CssClass
=
"ax-input-noborder"
Text='<%#Eval("empid")%>'></
asp:Label
>
</
td
>
<
td
style
=
"width: 50px"
></
td
>
<
td
style
=
"width: 120px"
>
<
asp:Label
ID
=
"Label7"
runat
=
"server"
CssClass
=
"ax-text-gray"
Text
=
"Select Parent"
></
asp:Label
>
</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"cbParent"
runat
=
"server"
Width
=
"400px"
>
<
ItemTemplate
>
<
telerik:RadTreeView
ID
=
"rTreeParent"
runat
=
"server"
DataFieldID
=
"userid"
DataFieldParentID
=
"parent_id"
DataTextField
=
"fullName"
DataValueField
=
"userid"
>
</
telerik:RadTreeView
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
td
>
<
td
rowspan
=
"3"
>
<
asp:Button
ID
=
"btnAssignProfiles"
CssClass
=
"btn btn-circle btn-sky"
runat
=
"server"
Text
=
"Assign"
/>
</
td
>
</
tr
>
</
table
>
<
br
/>
<
br
/>
</
fieldset
>
</
ItemTemplate
>
</
telerik:RadListView
>
code behind
protected
void
rlvUsers_ItemDataBound(
object
sender, RadListViewItemEventArgs e)
{
if
(e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem)
{
RadListViewItem item = e.Item
as
RadListViewItem;
RadComboBox cbParent = (RadComboBox)item.FindControl(
"cbParent"
);
cbParent.DataSource = getActiveUsers();
cbParent.DataBind();
}
}
Now it is loading in combo box. But I wan this in tree inside combobox
Thanks
Alex