Hi. Sorry, I'm just a bit nerd using this controls.
What I'm trying to do is quite simple: I want to display treeview with some nodes linked to PDF files. Whe you click on that node, I want the PDF to open in a new Window. I populate the tree with data from a Database using the Adjacency List Model. In the event RadTreeView1_NodeDataBound, I set the NavigateUrl property of the node this way:
where PDFpath is a valid URL to the PDF I want to show in a new window. It work's fine (the PDF is opened in a new window), but the treeView displayed on the main page vanished, and show the word : "[object]". What I'm doing wrong?.
The code I'm using on the ASP page is quite simple, as you can see:
Thank's in advance
What I'm trying to do is quite simple: I want to display treeview with some nodes linked to PDF files. Whe you click on that node, I want the PDF to open in a new Window. I populate the tree with data from a Database using the Adjacency List Model. In the event RadTreeView1_NodeDataBound, I set the NavigateUrl property of the node this way:
e.Node.NavigateUrl = "javascript:window.open('" + PDFpath + "')"
where PDFpath is a valid URL to the PDF I want to show in a new window. It work's fine (the PDF is opened in a new window), but the treeView displayed on the main page vanished, and show the word : "[object]". What I'm doing wrong?.
The code I'm using on the ASP page is quite simple, as you can see:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWeb._Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
.style1
{
width: 100%;
}
.style2
{
width: 271px;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<%-- <
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
Runat
=
"server"
DecoratedControls
=
"Fieldset"
/>--%>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
div
>
<
table
class
=
"style1"
>
<
tr
><
td
colspan
=
"2"
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
onclick
=
"Button1_Click"
Text
=
"llenar TreeView"
/>
<
asp:Button
ID
=
"Button2"
runat
=
"server"
onclick
=
"Button2_Click"
Text
=
"Expediente 1"
/>
</
td
>
</
tr
>
<
tr
>
<
td
class
=
"style2"
valign
=
"top"
>
<
fieldset
>
<
telerik:RadTreeView
ID
=
"RadTreeView1"
Runat
=
"server"
LoadingMessage
=
"Cargando ..."
Skin
=
"Outlook"
onnodedatabound
=
"RadTreeView1_NodeDataBound"
/>
</
fieldset
>
</
td
>
<
td
>
<
asp:GridView
ID
=
"GridView1"
runat
=
"server"
>
</
asp:GridView
>
</
td
>
</
tr
>
</
table
>
</
div
>
</
form
>
</
body
>
</
html
>
Thank's in advance