Posted on Oct 11, 2011 (permalink)
Reply
Posted on Oct 28, 2011 (permalink)
Posted on Nov 1, 2011 (permalink)
Posted on Nov 3, 2011 (permalink)
Posted on Nov 7, 2011 (permalink)
var
byScript =
false
;
function
onNodeSelected(e) {
true
nodeid = treeView().getItemValue(e.item);
location.hash =
"#node="
+ nodeid;
//<----- HashChange plugin
getNodeContentByID(nodeid);
expandNodeID(nodeid);
}
//Select a Node
ClickNode(nodeid) {
$(
"#TreeView"
).find(
".t-input[name='itemValue'][value='"
+ nodeid +
"']"
)
.closest(
"div"
.find(
".t-in:first"
.trigger(
"click"
);
//expand parent in case its closed
expandNodeID(parentNode(itemByValue(nodeid)));
() {
// Bind the event.
$(window).hashchange(
if
(!byScript) {
(location.hash.indexOf(
) > -1) {
ClickNode(location.hash.split(
"="
)[1]);
/*else if ($.cookie('SelectedNode') != null) {
ClickNode($.cookie('SelectedNode'));
} */
else
{
//selecting using serverside scripting...
ClickNode(@(Model.CourseTree.Count > 0 ? Model.CourseTree.First().CourseTreeNodeID : 0));
})
});
nodeid = treeView().getItemValue(e.item)
$.cookie(
'SelectedNode'
, nodeid);
//<-- require the jquery cookie plugin
$().ready(
"#tabs"
).tabs({ cookie: { expires: 1} });
setTimeout(
($.cookie(
"FocusTargetID"
) !=
null
) { //FocusTarget is set by a submit form
$($.cookie(
)).focus(); //OnSubmit the Form will set the cookie
,
); //And when the page returns, the focus is set
) {
ClickNode($.cookie(
));
$(window).hashchange();
}, 0);
Back to Top
[ ASP.NET MVC TreeView Features | Documentation | Demos | Telerik TV ]
UI controls for ASP.NET AJAX, MVC, WPF,Silverlight, Windows 8 and Windows Phone
Cross-platform Mobile Development Toolwith cloud-based architecture
Everything you need to build sites andmobile apps with JavaScript and HTML5
One easy tool for Functional, Performance,Load and Mobile software testing
Everything for your online business - contentmanagement, ecommerce, emarketing
Simple and intuitive project managementand collaboration software