Hello,
I have a treeview which displays a SQL data source. Add the properties I configured the DataFielID and the DataFieldParentID. Thats works great so far. When I select a node I would like to get the whole SQL data row of the select node. Right now I am just able to get the tex. But I need to pass the informations of the column LocPath to a other window. How can I access that?
Thanks for help.
I have a treeview which displays a SQL data source. Add the properties I configured the DataFielID and the DataFieldParentID. Thats works great so far. When I select a node I would like to get the whole SQL data row of the select node. Right now I am just able to get the tex. But I need to pass the informations of the column LocPath to a other window. How can I access that?
Thanks for help.
<html xmlns="http://www.w3.org/1999/xhtml" > | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body onloadonload=onload="AdjustRadWidow();"> | |
<script type="text/javascript"> | |
function GetRadWindow() | |
{ | |
var oWindow = null; | |
if (window.radWindow) oWindow = window.radWindow; | |
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; | |
return oWindow; | |
} | |
function AdjustRadWidow() { | |
setTimeout(function() { GetRadWindow().autoSize() }, 200); | |
} | |
function returnToParent() { | |
//create the argument that will be returned to the parent page | |
var oArg = new Object(); | |
//get the selected date from RadDatePicker | |
var treeView = $find("<%= RadTreeView1.ClientID %>"); | |
var selectedNode = treeView.get_selectedNode(); | |
oArg.TreeText = selectedNode._text; | |
//get a reference to the current RadWindow | |
var oWnd = GetRadWindow(); | |
//Close the RadWindow and send the argument to the parent page | |
oWnd.close(oArg); | |
} | |
</script> | |
<form id="form1" runat="server"> | |
<div> | |
<asp:ScriptManager ID="ScriptManager1" runat="server"> | |
</asp:ScriptManager> | |
<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="LocPK" | |
DataFieldParentID="ParentLocPK" DataSourceID="LocationsQuery" | |
DataTextField="LocID" AppendDataBoundItems="True"> | |
</telerik:RadTreeView> | |
<asp:SqlDataSource ID="LocationsQuery" runat="server" | |
ConnectionString="..." | |
SelectCommand="SELECT [LocPK], [LocID], [LocPath], [ParentLocPK] FROM [MMLocations]"> | |
</asp:SqlDataSource> | |
<button title="Submit" id="close" onclick="returnToParent(); return false;"> | |
Submit</button> | |
</div> | |
</form> | |
</body> | |
</html> |