Hi,
I'm trying to do expand/collapse in ClientSide with
function collapseAll() {
var panelBar = $find("<%= RadPanelBar1.ClientID %>");
var items = panelBar.get_items();
for (var i = 0; i < items.get_count(); i++) {
var item = panelBar.findItemByText(items.getItem(i).get_text());
if (item) {
item.collapse();
}
}
It works fine with Firefox but its been very slow with IE. Please suggest any work around for this.
regards,
Baaje
I'm trying to do expand/collapse in ClientSide with
function collapseAll() {
var panelBar = $find("<%= RadPanelBar1.ClientID %>");
var items = panelBar.get_items();
for (var i = 0; i < items.get_count(); i++) {
var item = panelBar.findItemByText(items.getItem(i).get_text());
if (item) {
item.collapse();
}
}
It works fine with Firefox but its been very slow with IE. Please suggest any work around for this.
regards,
Baaje
5 Answers, 1 is accepted
0
Hi balaji,
I'm afraid that this is the only way to collapse all the items. However you can modify the following code:
to:
Hope this helps.
Best wishes,
Yana
the Telerik team
I'm afraid that this is the only way to collapse all the items. However you can modify the following code:
var
item = panelBar.findItemByText(items.getItem(i).get_text());
to:
var
item = items.getItem(i);
Hope this helps.
Best wishes,
Yana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
balaji
Top achievements
Rank 1
answered on 14 Feb 2011, 01:36 PM
Hi yana,
thanx for your reply. but it doesn't help me in performance still its same.
regards,
Baaje
thanx for your reply. but it doesn't help me in performance still its same.
regards,
Baaje
0
Hello Baaje,
Please send us a live url where we can observe this behavior.
Greetings,
Yana
the Telerik team
Please send us a live url where we can observe this behavior.
Greetings,
Yana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Waseem
Top achievements
Rank 1
answered on 19 Apr 2013, 10:18 PM
Hi yana
How to check, if any item is expanded or collapse.
so if item is collapse , we can expand it. if item is expand , we collapse it.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
<script type="text/javascript">
$telerik.$(document).ready(function() {
$telerik.$(".rpExpandHandle").click(function() {
var panelBar = $find("<%= radPanelBar.ClientID %>");
if ( ) { //if it is collapse then expand it otherwise collapse it.
panelBar.get_items().getItem(0).expand();
}
else {
panelBar.get_items().getItem(0).collapse();
}
});
});
</script>
</telerik:RadCodeBlock>
Thanks,
the telerik team
How to check, if any item is expanded or collapse.
so if item is collapse , we can expand it. if item is expand , we collapse it.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
<script type="text/javascript">
$telerik.$(document).ready(function() {
$telerik.$(".rpExpandHandle").click(function() {
var panelBar = $find("<%= radPanelBar.ClientID %>");
if ( ) { //if it is collapse then expand it otherwise collapse it.
panelBar.get_items().getItem(0).expand();
}
else {
panelBar.get_items().getItem(0).collapse();
}
});
});
</script>
</telerik:RadCodeBlock>
Thanks,
the telerik team
0
Waseem
Top achievements
Rank 1
answered on 19 Apr 2013, 11:06 PM
I got a solution, by making isExpanded true , so it solve my problem.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
<script type="text/javascript">
var isExpanded = true;
$telerik.$(document).ready(function() {
$telerik.$(".rpExpandHandle").click(function() {
var panelBar = $find("<%= radPanelBar.ClientID %>");
if (isExpanded == true) {
panelBar.get_items().getItem(0).collapse();
isExpanded = false;
}
else {
panelBar.get_items().getItem(0).expand();
isExpanded = true;
}
});
});
</script>
</telerik:RadCodeBlock>
Thanks.
Muhammad Waseem
the telerik team
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
<script type="text/javascript">
var isExpanded = true;
$telerik.$(document).ready(function() {
$telerik.$(".rpExpandHandle").click(function() {
var panelBar = $find("<%= radPanelBar.ClientID %>");
if (isExpanded == true) {
panelBar.get_items().getItem(0).collapse();
isExpanded = false;
}
else {
panelBar.get_items().getItem(0).expand();
isExpanded = true;
}
});
});
</script>
</telerik:RadCodeBlock>
Thanks.
Muhammad Waseem
the telerik team