Hello All,
I want the RadPanelBar to load by collapsing all the items, if the user need to see and they can expand, but collapse all is not happening at all.
In my case my datasource will be like this
Item1
--Item1.1
--Item1.2
while loading the page I want to see only the Item1 alone
Mark up code:
<telerik:RadPanelBar ID="rdPnlOrgDetail" RenderMode="Lightweight" OnDataBound="rdPnlOrgDetail_DataBound" runat="server" OnPreRender="rdPnlOrgDetail_PreRender" AllowCollapseAllItems="true" ExpandMode="SingleExpandedItem" OnClientLoad="collapseAll">
</telerik:RadPanelBar>
Dynamically adding the Items
rdPnlOrgDetail.CollapseAllItems();
var source= getSource();
rdPnlOrgDetail.Items.Clear();
RadPanelItem orgItems = new RadPanelItem();
orgItems.Text = string.Format("{0} : {1}", orgChart.First().OrganisationScope.Scope, orgChart.First().Name.ToString());
orgItems.Expanded = false;
for (int i = 1; i < orgChart.Count; i++)
{
RadPanelItem orgItem = new RadPanelItem(string.Format("{0} : {1}", orgChart[i].OrganisationScope.Scope, orgChart[i].Name.ToString()));
orgItem.Expanded = false;
orgItems.Items.Add(orgItem);
orgItems.Expanded = false;
}
orgItems.Expanded = false;
rdPnlOrgDetail.Items.Add(orgItems);
rdPnlOrgDetail.CollapseAllItems();
please do the needful.
With Thanks
Amjath