Hello,
I'm trying to create a menu with RadPanelBar for showing groups of services, each group with their services associated. This menu has two levels, the parent level with the name of the group, and the child level with the name of the service. Because the user can select multiple services into a group, the child must be a Checkbox, and here I have the problem.
At this moment I handle two options: I have a DataBindings with a RadPanelItemBinding that give me the structure parent-child with the data correctly formed, but without the checkboxes. I don't know how can I use another control into the DataBindings structure, neither if I can.
In the other side, I have an ItemTemplate with the Checkboxes doing the same, but it doesn't differentiate the information about the parent and the child.
I'm binding the data to the RadPanelBar with this structure.
Thanks for your help.
I'm trying to create a menu with RadPanelBar for showing groups of services, each group with their services associated. This menu has two levels, the parent level with the name of the group, and the child level with the name of the service. Because the user can select multiple services into a group, the child must be a Checkbox, and here I have the problem.
At this moment I handle two options: I have a DataBindings with a RadPanelItemBinding that give me the structure parent-child with the data correctly formed, but without the checkboxes. I don't know how can I use another control into the DataBindings structure, neither if I can.
<
telerik:RadPanelBar
ID
=
"RadPanelBar1"
runat
=
"server"
ExpandMode
=
"SingleExpandedItem"
DataFieldID
=
"ID"
DataFieldParentID
=
"ParentID"
Width
=
"90%"
>
<
DataBindings
>
<
telerik:RadPanelItemBinding
ImageUrlField
=
"ImageUrl"
TextField
=
"Name"
Expanded
=
"True"
ChildGroupHeight
=
"200px"
/>
</
DataBindings
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
Text='<%# ((ServicePanelbarContainer)Container.DataItem).Name %>'/>
</
ItemTemplate
>
</
telerik:RadPanelBar
>
I'm binding the data to the RadPanelBar with this structure.
Thanks for your help.
int
i = 1;
foreach
(ServiceGroup serviceGroup
in
groupList)
{
serviceGroup.ImageUrl =
"../../Img/Icons/"
+ serviceGroup.ImageUrl;
parsedGroupList.Add(
new
ServicePanelbarContainer()
{
ParentID = 0,
ID = i,
Name = serviceGroup.Name,
ImageUrl = serviceGroup.ImageUrl
});
int
j = i;
i++;
foreach
(Service s
in
serviceGroup.Service)
{
parsedGroupList.Add(
new
ServicePanelbarContainer()
{
ParentID = j,
ID = i,
Name = s.Name,
ImageUrl =
""
});
i++;
}
}
RadPanelBar1.DataSource = parsedGroupList;
RadPanelBar1.DataBind();