5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 19 Jun 2009, 06:11 AM
Hi dan,
I tried following approach for opening the page in radwindow on clicking the RadPanelItem. I have attached the "OnClientItemClicking" event and explicitly opens the radWindow from clientside code. Give a try with this code.
ASPX:
JavaScript:
Thanks,
Princy.
I tried following approach for opening the page in radwindow on clicking the RadPanelItem. I have attached the "OnClientItemClicking" event and explicitly opens the radWindow from clientside code. Give a try with this code.
ASPX:
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" OnClientItemClicking="OnClientItemClicking" |
DataSourceID="SqlDataSource1" DataNavigateUrlField="url" |
DataTextField="Name" DataValueField="Name"> |
</telerik:RadPanelBar> |
JavaScript:
<script type="text/javascript"> |
function OnClientItemClicking(sender, args) |
{ |
var panelItem = args.get_item(); |
if(panelItem.get_navigateUrl()!="#") |
{ |
args.set_cancel(true); |
var window1 = radopen(panelItem.get_navigateUrl(),"win1"); |
} |
} |
</script> |
Thanks,
Princy.
0
Hi Dan,
You can easily achieve your goal by setting the Target property for the RadPanelItem to "_blank".
Regards,
Paul
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
You can easily achieve your goal by setting the Target property for the RadPanelItem to "_blank".
Regards,
Paul
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dan
Top achievements
Rank 1
answered on 19 Jun 2009, 02:56 PM
Thanks for the responses but I am binding the RadPanel to a DataTable and I don't explicitly define a RadPanelItem, so I'm not able to set the Target property of the PanelItem. It is very similiar to your online example of PanelBar / Hierarchical Data Binding.
Any other ideas?
Thanks,
Dan
Any other ideas?
Thanks,
Dan
0
Accepted
-DJ-
Top achievements
Rank 1
answered on 20 Jun 2009, 12:04 PM
Hi Dan,
You can use the itemcreated event to set the target:
Regards,
-DJ-
You can use the itemcreated event to set the target:
Protected Sub RadPanelbar1_ItemCreated(ByVal s As Object, ByVal e As RadPanelBarEventArgs) Handles RadPanelBar1.ItemCreated |
e.Item.Target = "_blank" |
End Sub |
Regards,
-DJ-
0
Dan
Top achievements
Rank 1
answered on 20 Jun 2009, 03:43 PM
Thanks DJ - that did the trick....
Dan
Dan