This is a migrated thread and some comments may be shown as answers.

RadPanelBar - how to unselect item

4 Answers 93 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 22 Mar 2009, 04:21 AM
I am trying to unselect the current selected item of the RadPanelBar inside the code. I set the RadPanelBar selected item to false but the highlighted grey color is still appearing. It seems to me that RadPanelBar does not get updated via ajax.I am assuming. In asp.net, I wrap the control with asp:updatepanel and in the code do Update(); and Bind();

Does any know how I do this with Telerik? ..or please let me know if my approach is incorrect. Thanks for any feedbacks.

-----------------sample code--------------------------
//Get RadPanelBar

RadPanelBar

 

radpanelbar= (RadPanelBar) folderExplorer.FindControl("RadPanelBar1");
//Unselected so that the highlighted color will disappear

 

 

radpanelbar.SelectedItem = false;

 

 

radpanelbar.DataBind();

 

4 Answers, 1 is accepted

Sort by
0
SamJ
Top achievements
Rank 1
answered on 22 Mar 2009, 08:06 AM
Hi Frank,

Are you using RadAjaxManager or RadAjaxPanel to ajaxify the page?
If using the RadAjaxManager, you just need to add an ajax setting where the RadPanelBar updates itself:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
   <AjaxSettings> 
       <telerik:AjaxSetting AjaxControlID="RadPanelBar1"
           <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadPanelBar1"
                </telerik:AjaxUpdatedControl> 
           </UpdatedControls> 
       </telerik:AjaxSetting> 
   </AjaxSettin> 
</telerik:RadAjaxManager> 

RadAjaxManager
RadAjaxPanel

I hope this can give the right direction.

SamJ


0
Pablo
Top achievements
Rank 1
answered on 24 Oct 2010, 11:22 PM
I have the same problem, but I have the RadPanelBar within a usercontrol (ascx). Within a ItemTemplate of RadPanelBar is a radTreeView. The radTreeView updated only if it is postback.

Thanks for your help.
0
Iana Tsolova
Telerik team
answered on 25 Oct 2010, 09:10 AM
Hello Pablo,

Can you elaborate a bit on your scenario? Does the TreeView updates properly on the server but the changes are not applied properly when the page renders? Do you have an ajax setting where the RadPanelBar is added as updated control?

Regards,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pablo
Top achievements
Rank 1
answered on 25 Oct 2010, 06:45 PM
The Problem is resolved. I was referencing using RadAjax.Net2 controls and Telerik.Web.UI in my solution. Does not fail, but it seems that there are problems in using them at the same time.
Thanks for everything.
Tags
Ajax
Asked by
Frank
Top achievements
Rank 1
Answers by
SamJ
Top achievements
Rank 1
Pablo
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or